Skip to content

Commit def6b4f

Browse files
Add test for #5258
1 parent 6663cff commit def6b4f

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

tests/end-to-end/regression/5258.phpt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--TEST--
2+
https://github.com/sebastianbergmann/phpunit/issues/5258
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--do-not-cache-result';
6+
$_SERVER['argv'][] = '--no-configuration';
7+
$_SERVER['argv'][] = '--log-junit';
8+
$_SERVER['argv'][] = '/dev/null';
9+
$_SERVER['argv'][] = __DIR__ . '/5258/Issue5258Test.php';
10+
11+
require_once __DIR__ . '/../../bootstrap.php';
12+
13+
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
14+
--XFAIL--
15+
https://github.com/sebastianbergmann/phpunit/issues/5258
16+
--EXPECTF--
17+
PHPUnit %s by Sebastian Bergmann and contributors.
18+
19+
Runtime: %s
20+
21+
.S 2 / 2 (100%)
22+
23+
Time: %s, Memory: %s MB
24+
25+
OK, but some tests were skipped!
26+
Tests: 2, Assertions: 1, Skipped: 1.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* This file is part of PHPUnit.
4+
*
5+
* (c) Sebastian Bergmann <[email protected]>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
namespace PHPUnit\TestFixture\Issue5258;
11+
12+
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
13+
use PHPUnit\Framework\Attributes\RunInSeparateProcess;
14+
use PHPUnit\Framework\TestCase;
15+
16+
final class Issue5258Test extends TestCase
17+
{
18+
public function testOne(): void
19+
{
20+
$this->assertTrue(true);
21+
}
22+
23+
#[RunInSeparateProcess]
24+
#[RequiresPhpExtension('notinstalled')]
25+
public function testTwo(): void
26+
{
27+
$this->assertTrue(true);
28+
}
29+
}

0 commit comments

Comments
 (0)