From 39779332a3efb0a741bf233ccd29ade6e3dcd7a2 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Thu, 21 Mar 2024 07:39:39 +0100 Subject: [PATCH] Add test for #5760 --- tests/end-to-end/regression/5760.phpt | 33 +++++++++++++++++++ .../regression/5760/Issue5760Test.php | 25 ++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 tests/end-to-end/regression/5760.phpt create mode 100644 tests/end-to-end/regression/5760/Issue5760Test.php diff --git a/tests/end-to-end/regression/5760.phpt b/tests/end-to-end/regression/5760.phpt new file mode 100644 index 00000000000..351de080ae0 --- /dev/null +++ b/tests/end-to-end/regression/5760.phpt @@ -0,0 +1,33 @@ +--TEST-- +https://github.com/sebastianbergmann/phpunit/issues/5760 +--XFAIL-- +https://github.com/sebastianbergmann/phpunit/issues/5760 +--FILE-- +run($_SERVER['argv']); +--EXPECTF-- +PHPUnit %s by Sebastian Bergmann and contributors. + +Runtime: %s + +E 1 / 1 (100%) + +Time: %s, Memory: %s + +Issue5760 (PHPUnit\TestFixture\Issue5760\Issue5760) + ✘ One + │ + │ Exception: message + │ + │ %s:19 + │ + +ERRORS! +Tests: 1, Assertions: 0, Errors: 1. diff --git a/tests/end-to-end/regression/5760/Issue5760Test.php b/tests/end-to-end/regression/5760/Issue5760Test.php new file mode 100644 index 00000000000..b4babfb9f11 --- /dev/null +++ b/tests/end-to-end/regression/5760/Issue5760Test.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\TestFixture\Issue5760; + +use Exception; +use PHPUnit\Framework\TestCase; + +final class Issue5760Test extends TestCase +{ + protected function setUp(): void + { + throw new Exception('message'); + } + + public function testOne(): void + { + } +}