diff --git a/tests/end-to-end/regression/5771.phpt b/tests/end-to-end/regression/5771.phpt new file mode 100644 index 00000000000..c711be82fd3 --- /dev/null +++ b/tests/end-to-end/regression/5771.phpt @@ -0,0 +1,26 @@ +--TEST-- +https://github.com/sebastianbergmann/phpunit/issues/5771 +--FILE-- +run($_SERVER['argv']); +--EXPECTF-- +PHPUnit %s by Sebastian Bergmann and contributors. + +Runtime: %s + +E 1 / 1 (100%) + +Time: %s, Memory: %s + +There was 1 error: + +1) PHPUnit\TestFixture\Issue5771\Issue5771Test::test +Test was run in child process and ended unexpectedly + +ERRORS! +Tests: 1, Assertions: 0, Errors: 1. diff --git a/tests/end-to-end/regression/5771/Issue5771Test.php b/tests/end-to-end/regression/5771/Issue5771Test.php new file mode 100644 index 00000000000..72fd7f94a24 --- /dev/null +++ b/tests/end-to-end/regression/5771/Issue5771Test.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\TestFixture\Issue5771; + +use PHPUnit\Framework\Attributes\RunInSeparateProcess; +use PHPUnit\Framework\TestCase; + +final class Issue5771Test extends TestCase +{ + #[RunInSeparateProcess] + public function test(): void + { + exit; + } +}