Skip to content

Commit

Permalink
This needs to be an end-to-end test (otherwise it would be affected b…
Browse files Browse the repository at this point in the history
…y random test ordering)
  • Loading branch information
sebastianbergmann committed Jun 20, 2024
1 parent 23deadb commit 67323d2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
21 changes: 21 additions & 0 deletions tests/end-to-end/regression/5875.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--TEST--
https://github.com/sebastianbergmann/phpunit/issues/5875
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
$_SERVER['argv'][] = '--no-configuration';
$_SERVER['argv'][] = __DIR__ . '/5875/Issue5875Test.php';

require_once __DIR__ . '/../../bootstrap.php';

(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.

Runtime: %s

..... 5 / 5 (100%)

Time: %s, Memory: %s

OK (5 tests, 5 assertions)
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPUnit\Framework;
namespace PHPUnit\TestFixture\Issue5875;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Depends;
use PHPUnit\Framework\Attributes\Small;
use PHPUnit\Framework\Attributes\TestWith;
use PHPUnit\Framework\TestCase;

#[CoversClass(TestSuite::class)]
#[Small]
final class TestSuiteRunDestructsTestCaseTest extends TestCase
final class Issue5875Test extends TestCase
{
private static int $destructsDone = 0;

Expand Down

0 comments on commit 67323d2

Please sign in to comment.