Skip to content

Commit

Permalink
The test code for stderr getting redirected to stdout does not work o…
Browse files Browse the repository at this point in the history
…n PHP 8.2
  • Loading branch information
sebastianbergmann committed May 14, 2024
1 parent 4e6c2ad commit 74e00fb
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/unit/Util/PHP/DefaultJobRunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
namespace PHPUnit\Util\PHP;

use function version_compare;
use Generator;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
Expand Down Expand Up @@ -58,17 +59,19 @@ public static function provider(): Generator
),
];

yield 'stderr redirected to stdout' => [
new Result('test', ''),
new Job(
<<<'EOT'
if (version_compare(PHP_VERSION, '8.3.0', '>')) {
yield 'stderr redirected to stdout' => [
new Result('test', ''),
new Job(
<<<'EOT'
<?php declare(strict_types=1);
fwrite(STDERR, 'test');
EOT,
redirectErrors: true,
),
];
redirectErrors: true,
),
];
}

yield 'configured environment variables' => [
new Result('test', ''),
Expand Down

0 comments on commit 74e00fb

Please sign in to comment.