Skip to content

Commit 978ed6b

Browse files
Merge branch '6.5' into 7.1
2 parents 180b1e3 + 8995bf5 commit 978ed6b

File tree

6 files changed

+59
-2
lines changed

6 files changed

+59
-2
lines changed

ChangeLog-6.5.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes of the PHPUnit 6.5 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
44

5+
## [6.5.8] - 2018-MM-DD
6+
7+
### Fixed
8+
9+
* Fixed [#2830](https://github.com/sebastianbergmann/phpunit/issues/2830): `@runClassInSeparateProcess` does not work for tests that use `@dataProvider`
10+
511
## [6.5.7] - 2018-02-26
612

713
### Fixed
@@ -56,6 +62,7 @@ All notable changes of the PHPUnit 6.5 release series are documented in this fil
5662
* Fixed [#2654](https://github.com/sebastianbergmann/phpunit/issues/2654): Problems with `assertJsonStringEqualsJsonString()`
5763
* Fixed [#2810](https://github.com/sebastianbergmann/phpunit/pull/2810): Code Coverage for PHPT tests does not work
5864

65+
[6.5.8]: https://github.com/sebastianbergmann/phpunit/compare/6.5.7...6.5.8
5966
[6.5.7]: https://github.com/sebastianbergmann/phpunit/compare/6.5.6...6.5.7
6067
[6.5.6]: https://github.com/sebastianbergmann/phpunit/compare/6.5.5...6.5.6
6168
[6.5.5]: https://github.com/sebastianbergmann/phpunit/compare/6.5.4...6.5.5

ChangeLog-7.1.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes of the PHPUnit 7.1 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
44

5+
## [7.1.2] - 2018-MM-DD
6+
7+
### Fixed
8+
9+
* Fixed [#2830](https://github.com/sebastianbergmann/phpunit/issues/2830): `@runClassInSeparateProcess` does not work for tests that use `@dataProvider`
10+
511
## [7.1.1] - 2018-04-06
612

713
### Fixed
@@ -20,6 +26,7 @@ All notable changes of the PHPUnit 7.1 release series are documented in this fil
2026
* `PHPUnit\Framework\Assert` is no longer searched for test methods
2127
* `ReflectionMethod::invokeArgs()` is no longer used to invoke test methods
2228

29+
[7.1.2]: https://github.com/sebastianbergmann/phpunit/compare/7.1.1...7.1.2
2330
[7.1.1]: https://github.com/sebastianbergmann/phpunit/compare/7.1.0...7.1.1
2431
[7.1.0]: https://github.com/sebastianbergmann/phpunit/compare/7.0...7.1.0
2532

src/Framework/TestCase.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,8 @@ public function run(TestResult $result = null): TestResult
780780
'isStrictAboutTodoAnnotatedTests' => $isStrictAboutTodoAnnotatedTests,
781781
'isStrictAboutResourceUsageDuringSmallTests' => $isStrictAboutResourceUsageDuringSmallTests,
782782
'codeCoverageFilter' => $codeCoverageFilter,
783-
'configurationFilePath' => $configurationFilePath
783+
'configurationFilePath' => $configurationFilePath,
784+
'name' => $this->getName(false),
784785
];
785786

786787
if (!$runEntireClass) {

src/Util/PHP/Template/TestCaseClass.tpl.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function __phpunit_run_isolated_test()
4747
$result->beStrictAboutTodoAnnotatedTests({isStrictAboutTodoAnnotatedTests});
4848
$result->beStrictAboutResourceUsageDuringSmallTests({isStrictAboutResourceUsageDuringSmallTests});
4949

50-
$test = new {className}(null, unserialize('{data}'), '{dataName}');
50+
$test = new {className}('{name}', unserialize('{data}'), '{dataName}');
5151
$test->setDependencyInput(unserialize('{dependencyInput}'));
5252
$test->setInIsolation(TRUE);
5353

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)