Skip to content

Commit dcd0eac

Browse files
Merge branch '9.6' into 10.5
* 9.6: Add test for #6406
2 parents 833f137 + d2a747a commit dcd0eac

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
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/6406
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--do-not-cache-result';
6+
$_SERVER['argv'][] = '--no-configuration';
7+
$_SERVER['argv'][] = __DIR__ . '/6406/Issue6406Test.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+
.. 2 / 2 (100%)
18+
19+
Time: %s, Memory: %s
20+
21+
OK (2 tests, 2 assertions)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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\Issue6406;
11+
12+
use const INF;
13+
use const NAN;
14+
use PHPUnit\Framework\Attributes\DataProvider;
15+
use PHPUnit\Framework\TestCase;
16+
17+
final class Issue6406Test extends TestCase
18+
{
19+
public static function provider(): array
20+
{
21+
return [
22+
'inf' => [INF],
23+
'nan' => [NAN],
24+
];
25+
}
26+
27+
#[DataProvider('provider')]
28+
public function testOne($value): void
29+
{
30+
$this->assertTrue(true);
31+
}
32+
}

0 commit comments

Comments
 (0)