X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Fphpunit_coverage.php;h=eafe0e8d7f088639a290caf0421b0a2416cc8229;hb=d20c6b4814808f6292298ae5cada12a7dd5b69eb;hp=35ae9167a6194f0b948f9c47a07fc9418a7515b7;hpb=3167db6472d5b6c691348e38b6f166198325bb6c;p=plcapi.git diff --git a/tests/phpunit_coverage.php b/tests/phpunit_coverage.php index 35ae916..eafe0e8 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-2019 G. Giunta + * @copyright (C) 2007-2021 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;