X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Fphpunit_coverage.php;h=37c05d96605ae403269f1cb23762d5991af45d06;hb=cededf794de647d2cf7c4af1b30c543e34382b17;hp=ae7b998b8d227d7093c83f83c408ebdbd77e8231;hpb=bd4048215800186db5224ea04e0d45cab97c12b9;p=plcapi.git diff --git a/tests/phpunit_coverage.php b/tests/phpunit_coverage.php index ae7b998..37c05d9 100644 --- a/tests/phpunit_coverage.php +++ b/tests/phpunit_coverage.php @@ -2,7 +2,7 @@ /** * Used to serve back the server-side code coverage results to phpunit-selenium * - * @copyright (C) 2007-2015 G. Giunta + * @copyright (C) 2007-2020 G. Giunta * @license code licensed under the BSD License: see file license.txt **/ @@ -11,6 +11,10 @@ $coverageFile = realpath(__DIR__ . "/../vendor/phpunit/phpunit-selenium/PHPUnit/ // has to be the same value as used in server.php $GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = '/tmp/phpxmlrpc_coverage'; +if (!is_dir($GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'])) { + mkdir($GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY']); +} + chdir($GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY']); -include_once $coverageFile; \ No newline at end of file +include_once $coverageFile;