Skip to content

Commit 620ef48

Browse files
mihailogajicsebastianbergmann
authored andcommitted
issue/2724: test coverage
1 parent fd66ccd commit 620ef48

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

tests/Regression/GitHub/2830.phpt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
GH-2830: @runClassInSeparateProcess fails for tests with a @dataProvider
3+
--FILE--
4+
<?php
5+
$_SERVER['argv'][1] = '--no-configuration';
6+
$_SERVER['argv'][2] = 'Issue2830';
7+
$_SERVER['argv'][3] = __DIR__ . '/2830/Issue2830Test.php';
8+
9+
require __DIR__ . '/../../bootstrap.php';
10+
11+
PHPUnit\TextUI\Command::main();
12+
?>
13+
--EXPECTF--
14+
PHPUnit %s by Sebastian Bergmann and contributors.
15+
16+
. 1 / 1 (100%)
17+
18+
Time: %s, Memory: %s
19+
20+
OK (1 test, 1 assertion)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
/**
4+
* @runClassInSeparateProcess
5+
*/
6+
class Issue2830Test extends PHPUnit\Framework\TestCase
7+
{
8+
/**
9+
* @dataProvider simpleDataProvider
10+
*/
11+
public function testMethodUsesDataProvider()
12+
{
13+
$this->assertTrue(true);
14+
}
15+
16+
public function simpleDataProvider()
17+
{
18+
return [
19+
['foo'],
20+
];
21+
}
22+
}

0 commit comments

Comments
 (0)