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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

juampynr created an issue. See original summary.

juampynr’s picture

Status: Active » Needs review
FileSize
1.31 KB

Here is a patch that adjusts the Mink variables in phpunit.xml.dist.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

joachim’s picture

Status: Needs review » Reviewed & tested by the community

This makes the example code clearer. Thanks for the patch!

tstoeckler’s picture

Just 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.

catch’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs re-roll

Needs a re-roll.

shubham.prakash’s picture

Status: Needs work » Needs review
FileSize
1.32 KB

This patch should fix the issue.

joachim’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed 83a6e95 and pushed to 8.8.x. Thanks!

Fixed on commit

diff --git a/core/phpunit.xml.dist b/core/phpunit.xml.dist
index 4221bd4432..2202550fee 100644
--- a/core/phpunit.xml.dist
+++ b/core/phpunit.xml.dist
@@ -29,7 +29,7 @@
     <env name="MINK_DRIVER_ARGS" value=''/>
     <!-- Example for changing the driver args to phantomjs tests MINK_DRIVER_ARGS_PHANTOMJS value: '["http://127.0.0.1:8510"]' -->
     <env name="MINK_DRIVER_ARGS_PHANTOMJS" value=''/>
-    <!-- Example for changing the driver args to webdriver tests MINK_DRIVER_ARGS_WEBDRIVER value: '["firefox", null, "http://localhost:4444/wd/hub"]' For using the Chrome browser, replace "firefox" for "chrome" -->
+    <!-- Example for changing the driver args to webdriver tests MINK_DRIVER_ARGS_WEBDRIVER value: '["firefox", null, "http://localhost:4444/wd/hub"]' For using the Chrome browser, replace "firefox" with "chrome" -->
     <env name="MINK_DRIVER_ARGS_WEBDRIVER" value=''/>
   </php>
   <testsuites>

Should be 'with', not 'for'

  • larowlan committed 83a6e95 on 8.8.x
    Issue #2962765 by juampynr, shubham.prakash: Clarify how to set MINK...
larowlan’s picture

Version: 8.8.x-dev » 8.7.x-dev

Cherry-picked this to 8.7.x

  • larowlan committed 5835aec on 8.7.x
    Issue #2962765 by juampynr, shubham.prakash: Clarify how to set MINK...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.