Skip to content

Commit b100f50

Browse files
committed
Update bootstrap.php
Hello, When running tests with processIsolation="true" on phpunit.xml, the bootstrap file is executed for each file. So to run these tests, there is an error: PHPUnit_Framework_Exception : Notice: Constant CMF_TEST_ROOT_DIR already defined in vendor\symfony-cmf\testing\bootstrap\bootstrap.php on line 32 This update resolve the error. Regards,
1 parent 679785e commit b100f50

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bootstrap/bootstrap.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,9 @@
2929

3030
AnnotationRegistry::registerFile($vendorDir.'/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Mapping/Annotations/DoctrineAnnotations.php');
3131

32-
define('CMF_TEST_ROOT_DIR', realpath(__DIR__.'/..'));
33-
define('CMF_TEST_CONFIG_DIR', CMF_TEST_ROOT_DIR.'/resources/config');
32+
if (!defined('CMF_TEST_ROOT_DIR')) {
33+
define('CMF_TEST_ROOT_DIR', realpath(__DIR__.'/..'));
34+
}
35+
if (!defined('CMF_TEST_CONFIG_DIR')) {
36+
define('CMF_TEST_CONFIG_DIR', CMF_TEST_ROOT_DIR.'/resources/config');
37+
}

0 commit comments

Comments
 (0)