Define constant conditionally
Define constant conditionally

Without this, we suddenly get the error shown below when generating code coverage for PHPUnit using PHPUnit's own test suite

1) /usr/local/src/phpunit/tests/end-to-end/event/status.phpt
Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@
-Test Runner Started (PHPUnit %s using %s)
+Warning: Constant TEST_FILES_PATH already defined in /usr/local/src/phpunit/tests/bootstrap.php on line 10
+Test Runner Started (PHPUnit 10.0-geacebf561 using PHP 8.0.10 (cli) on Linux)
 Test Runner Configuration Combined
 Test Suite Loaded (14 tests)
 Test Suite Sorted
@@ @@
 Test Considered Risky (PHPUnit\SelfTest\Basic\StatusTest::testRisky)
 This test did not perform any assertions

-%s/StatusTest.php:53
+/usr/local/src/phpunit/tests/basic/unit/StatusTest.php:53
 Test Finished (PHPUnit\SelfTest\Basic\StatusTest::testRisky)
 Test Prepared (PHPUnit\SelfTest\Basic\StatusTest::testWarning)
 Test Passed With Warning (PHPUnit\SelfTest\Basic\StatusTest::testWarning)
@@ @@
 Test Considered Risky (PHPUnit\SelfTest\Basic\StatusTest::testRiskyWithMessage)
 This test did not perform any assertions

-%s/StatusTest.php:87
+/usr/local/src/phpunit/tests/basic/unit/StatusTest.php:87
 Test Finished (PHPUnit\SelfTest\Basic\StatusTest::testRiskyWithMessage)
 Test Prepared (PHPUnit\SelfTest\Basic\StatusTest::testWarningWithMessage)
 Test Passed With Warning (PHPUnit\SelfTest\Basic\StatusTest::testWarningWithMessage)

/usr/local/src/phpunit/tests/end-to-end/event/status.phpt:27
/usr/local/src/phpunit/src/Framework/TestSuite.php:512
/usr/local/src/phpunit/src/Framework/TestSuite.php:512
/usr/local/src/phpunit/src/TextUI/TestRunner.php:405
/usr/local/src/phpunit/src/TextUI/Application.php:112
/usr/local/src/phpunit/src/TextUI/Application.php:80

sebastianbergmann/phpunit