Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
When I look at the php section at phpunit.xml.dist I see the following:
<!-- Set error reporting to E_ALL. -->
<ini name="error_reporting" value="32767"/>
<!-- Do not limit the amount of memory tests take to run. -->
<ini name="memory_limit" value="-1"/>
<!-- Example SIMPLETEST_BASE_URL value: http://localhost -->
<env name="SIMPLETEST_BASE_URL" value=""/>
<!-- Example SIMPLETEST_DB value: mysql://username:password@localhost/databasename#table_prefix -->
<env name="SIMPLETEST_DB" value=""/>
<!-- Example BROWSERTEST_OUTPUT_DIRECTORY value: /path/to/webroot/sites/simpletest/browser_output -->
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value=""/>
<!-- To disable deprecation testing uncomment the next line. -->
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak_vendors"/>
<!-- Example for changing the driver class for mink tests MINK_DRIVER_CLASS value: 'Drupal\FunctionalJavascriptTests\DrupalSelenium2Driver' -->
<!-- Example for changing the driver args to mink tests MINK_DRIVER_ARGS value: '["http://127.0.0.1:8510"]' -->
<!-- Example for changing the driver args to phantomjs tests MINK_DRIVER_ARGS_PHANTOMJS value: '["http://127.0.0.1:8510"]' -->
<!-- Example for changing the driver args to webdriver tests MINK_DRIVER_ARGS_WEBDRIVER value: '["firefox", null, "http://localhost:4444/wd/hub"]' -->
</php>
The Mink variables aren't set to empty values like the other ones, which led me to think that they could not be set here. It was by debugging a JavaScript test that I saw that these are environment variables that I could adjust. After doing so I started seeing Chrome being opened when I ran tests.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2962765-8.patch | 1.32 KB | shubham.prakash |
#2 | 2962765-2-drupal-clarify_mink_vars.patch | 1.31 KB | juampynr |
Comments
Comment #2
juampynr CreditAttribution: juampynr at Lullabot for NBCUniversal commentedHere is a patch that adjusts the Mink variables in phpunit.xml.dist.
Comment #5
joachim CreditAttribution: joachim commentedThis makes the example code clearer. Thanks for the patch!
Comment #6
tstoecklerJust as a heads up if people here are overriding those: We have #2978270: Javascript tests are failing if you override MINK_DRIVER_CLASS and #2941862: Overriding both Mink driver class *and* args does not work for JS tests, which I assume are still valid.
Comment #7
catchNeeds a re-roll.
Comment #8
shubham.prakash CreditAttribution: shubham.prakash at OpenSense Labs commentedThis patch should fix the issue.
Comment #9
joachim CreditAttribution: joachim as a volunteer commentedThanks!
Comment #10
larowlanCommitted 83a6e95 and pushed to 8.8.x. Thanks!
Fixed on commit
Should be 'with', not 'for'
Comment #12
larowlanCherry-picked this to 8.7.x