O'Reilly logo

Drupal 8 Module Development by Daniel Sipos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuration for functional tests

Before writing our functional tests we need to turn back to our phpunit.xml file and change some environment variables. Apart from the SIMPLETEST_DB variable we adjusted earlier, we also have the SIMPLETEST_BASE_URL and BROWSERTEST_OUTPUT_DIRECTORY. The first is used to know where can the application be accessed in the browser. The latter is the directory where output data can be saved by PHPUnit and needs to be an absolute local path (for example a folder in the local files folder):

/var/www/sites/default/files/browser-output 

Moreover, make sure the user running the test has permissions to write into the sites/simpletest folder as that is where the virtual file system is created for each test. The easiest ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required