Skip to content

Commit 97f6878

Browse files
staabmsebastianbergmann
authored andcommitted
try reproducing bug5795
1 parent 1a63f0d commit 97f6878

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--TEST--
2+
https://github.com/sebastianbergmann/phpunit/issues/5795
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--do-not-cache-result';
6+
$_SERVER['argv'][] = '--no-configuration';
7+
$_SERVER['argv'][] = '--testdox';
8+
$_SERVER['argv'][] = __DIR__ . '/5795/Issue5795Test.php';
9+
10+
require_once __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+
... 3 / 3 (100%)
19+
20+
Time: %s, Memory: %s
21+
22+
Issue5795 (PHPUnit\TestFixture\Issue5795\Issue5795)
23+
✔ This test should make phpunit spit a PHP Warning ! with data set #0
24+
✔ This test should make phpunit spit a PHP Warning ! with data set #1
25+
✔ This test should make phpunit spit a PHP Warning ! with data set #2
26+
27+
OK (3 tests, 3 assertions)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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\Issue5795;
11+
12+
use PHPUnit\Framework\TestCase;
13+
14+
final class Issue5795Test extends TestCase
15+
{
16+
/**
17+
* @testWith [1]
18+
* [2]
19+
* [3]
20+
*
21+
* @testdox This test should make phpunit spit a PHP Warning !
22+
*/
23+
public function testExample($arg): void
24+
{
25+
$this->assertIsInt($arg);
26+
}
27+
}

0 commit comments

Comments
 (0)