-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Milestone
Description
Hello,
I have a phpunit.xml with bootstrap and some global variables set.
When I'm running "phpunit" without argument, my bootstrap.php has globals var set.
But when I run "phpunit --bootstrap test/bootstrap.php" (which is exactly the same file), none of the globals are set.
Here is my phpunit.xml:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="test/bootstrap.php">
<php>
<env name="foo" value="bar"/>
</php>
<testsuites>
<testsuite name="My Test Suite">
<directory>test</directory>
</testsuite>
</testsuites>
</phpunit>
And my bootstrap.php:
logBoostrap(implode(' ', $_SERVER['argv']) . ':' );
logBoostrap( print_R($_ENV,true));
logBoostrap('_________________________');
function logBoostrap($message){
$logFile = __DIR__ .'/bootstrap.txt';
file_put_contents($logFile, $message . PHP_EOL, FILE_APPEND);
}
I have a pull request ready for this, but I wanted to know if it was a normal behavior or an issue?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels