Skip to content

Commit 67323d2

Browse files
This needs to be an end-to-end test (otherwise it would be affected by random test ordering)
1 parent 23deadb commit 67323d2

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--TEST--
2+
https://github.com/sebastianbergmann/phpunit/issues/5875
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--do-not-cache-result';
6+
$_SERVER['argv'][] = '--no-configuration';
7+
$_SERVER['argv'][] = __DIR__ . '/5875/Issue5875Test.php';
8+
9+
require_once __DIR__ . '/../../bootstrap.php';
10+
11+
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
12+
--EXPECTF--
13+
PHPUnit %s by Sebastian Bergmann and contributors.
14+
15+
Runtime: %s
16+
17+
..... 5 / 5 (100%)
18+
19+
Time: %s, Memory: %s
20+
21+
OK (5 tests, 5 assertions)

tests/unit/Framework/TestSuiteRunDestructsTestCaseTest.php renamed to tests/end-to-end/regression/5875/Issue5875Test.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@
77
* For the full copyright and license information, please view the LICENSE
88
* file that was distributed with this source code.
99
*/
10-
namespace PHPUnit\Framework;
10+
namespace PHPUnit\TestFixture\Issue5875;
1111

12-
use PHPUnit\Framework\Attributes\CoversClass;
1312
use PHPUnit\Framework\Attributes\Depends;
14-
use PHPUnit\Framework\Attributes\Small;
1513
use PHPUnit\Framework\Attributes\TestWith;
14+
use PHPUnit\Framework\TestCase;
1615

17-
#[CoversClass(TestSuite::class)]
18-
#[Small]
19-
final class TestSuiteRunDestructsTestCaseTest extends TestCase
16+
final class Issue5875Test extends TestCase
2017
{
2118
private static int $destructsDone = 0;
2219

0 commit comments

Comments
 (0)