Skip to content

Commit df65cac

Browse files
staabmsebastianbergmann
authored andcommitted
Added regression test to prevent endless loop in subprocess
1 parent 2fcb883 commit df65cac

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--TEST--
2+
https://github.com/sebastianbergmann/phpunit/issues/6304
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--do-not-cache-result';
6+
$_SERVER['argv'][] = '--no-configuration';
7+
$_SERVER['argv'][] = '--display-phpunit-deprecations';
8+
$_SERVER['argv'][] = __DIR__ . '/6304/Issue6304Test.php';
9+
10+
require __DIR__ . '/../../bootstrap.php';
11+
12+
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
13+
--EXPECTF--
14+
PHPUnit %s by Sebastian Bergmann and contributors.
15+
16+
Runtime: %s
17+
18+
. 1 / 1 (100%)
19+
20+
Time: %s, Memory: %s MB
21+
22+
There were 2 PHPUnit test runner deprecations:
23+
24+
1) Metadata found in doc-comment for class Issue6304Test. Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.
25+
26+
2) Metadata found in doc-comment for class Issue6304Test. Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.
27+
28+
OK, but there were issues!
29+
Tests: 1, Assertions: 1, PHPUnit Deprecations: 2.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
/*
5+
* This file is part of PHPUnit.
6+
*
7+
* (c) Sebastian Bergmann <[email protected]>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
12+
use PHPUnit\Framework\TestCase;
13+
14+
/**
15+
* @group test
16+
*
17+
* @runTestsInSeparateProcesses
18+
*/
19+
final class Issue6304Test extends TestCase
20+
{
21+
public function testOne(): void
22+
{
23+
$this->assertTrue(true);
24+
}
25+
}

0 commit comments

Comments
 (0)