Skip to content

Commit 79988e1

Browse files
Merge branch '7.3'
2 parents bf1410d + 8b1fa60 commit 79988e1

File tree

4 files changed

+62
-2
lines changed

4 files changed

+62
-2
lines changed

ChangeLog-6.5.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
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.13] - 2018-MM-DD
6+
7+
* Fixed [#3254](https://github.com/sebastianbergmann/phpunit/issues/3254): TextUI test runner cannot run a `Test` instance that is not a `TestSuite`
8+
59
## [6.5.12] - 2018-08-22
610

711
* Fixed [#3248](https://github.com/sebastianbergmann/phpunit/issues/3248) and [#3233](https://github.com/sebastianbergmann/phpunit/issues/3233): `phpunit.xsd` dictates element order where it should not
@@ -85,6 +89,7 @@ All notable changes of the PHPUnit 6.5 release series are documented in this fil
8589
* Fixed [#2654](https://github.com/sebastianbergmann/phpunit/issues/2654): Problems with `assertJsonStringEqualsJsonString()`
8690
* Fixed [#2810](https://github.com/sebastianbergmann/phpunit/pull/2810): Code Coverage for PHPT tests does not work
8791

92+
[6.5.13]: https://github.com/sebastianbergmann/phpunit/compare/6.5.12...6.5.13
8893
[6.5.12]: https://github.com/sebastianbergmann/phpunit/compare/6.5.11...6.5.12
8994
[6.5.11]: https://github.com/sebastianbergmann/phpunit/compare/6.5.10...6.5.11
9095
[6.5.10]: https://github.com/sebastianbergmann/phpunit/compare/6.5.9...6.5.10

ChangeLog-7.3.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.3 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
44

5+
## [7.3.5] - 2018-MM-DD
6+
7+
### Fixed
8+
9+
* Fixed [#3254](https://github.com/sebastianbergmann/phpunit/issues/3254): TextUI test runner cannot run a `Test` instance that is not a `TestSuite`
10+
511
## [7.3.4] - 2018-09-05
612

713
### Fixed
@@ -58,6 +64,7 @@ All notable changes of the PHPUnit 7.3 release series are documented in this fil
5864
* Fixed [#3222](https://github.com/sebastianbergmann/phpunit/pull/3222): Priority of `@covers` and `@coversNothing` is wrong
5965
* Fixed [#3225](https://github.com/sebastianbergmann/phpunit/issues/3225): `coverage-php` missing from `phpunit.xsd`
6066

67+
[7.3.5]: https://github.com/sebastianbergmann/phpunit/compare/7.3.4...7.3.5
6168
[7.3.4]: https://github.com/sebastianbergmann/phpunit/compare/7.3.3...7.3.4
6269
[7.3.3]: https://github.com/sebastianbergmann/phpunit/compare/7.3.2...7.3.3
6370
[7.3.2]: https://github.com/sebastianbergmann/phpunit/compare/7.3.1...7.3.2

src/TextUI/TestRunner.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,6 @@ public function doRun(Test $suite, array $arguments = [], bool $exit = true): Te
155155

156156
$this->handleConfiguration($arguments);
157157

158-
$this->processSuiteFilters($suite, $arguments);
159-
160158
if (isset($arguments['bootstrap'])) {
161159
$GLOBALS['__PHPUNIT_BOOTSTRAP'] = $arguments['bootstrap'];
162160
}
@@ -575,6 +573,7 @@ public function doRun(Test $suite, array $arguments = [], bool $exit = true): Te
575573
$result->setTimeoutForLargeTests($arguments['timeoutForLargeTests']);
576574

577575
if ($suite instanceof TestSuite) {
576+
$this->processSuiteFilters($suite, $arguments);
578577
$suite->setRunTestInSeparateProcess($arguments['processIsolation']);
579578
}
580579

tests/unit/TextUI/TestRunnerTest.php

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php
2+
/*
3+
* This file is part of PHPUnit.
4+
*
5+
* (c) Sebastian Bergmann <sebastian@phpunit.de>
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\TextUI;
11+
12+
use PHPUnit\Framework\TestCase;
13+
14+
class TestRunnerTest extends TestCase
15+
{
16+
public function testTestIsRunnable()
17+
{
18+
$runner = new TestRunner();
19+
$runner->setPrinter($this->getResultPrinterMock());
20+
$runner->doRun(new \Success(), ['filter' => 'foo'], false);
21+
}
22+
23+
public function testSuiteIsRunnable()
24+
{
25+
$runner = new TestRunner();
26+
$runner->setPrinter($this->getResultPrinterMock());
27+
$runner->doRun($this->getSuiteMock(), ['filter' => 'foo'], false);
28+
}
29+
30+
/**
31+
* @return \PHPUnit\TextUI\ResultPrinter
32+
*/
33+
private function getResultPrinterMock()
34+
{
35+
return $this->createMock(\PHPUnit\TextUI\ResultPrinter::class);
36+
}
37+
38+
/**
39+
* @return \PHPUnit\Framework\TestSuite
40+
*/
41+
private function getSuiteMock()
42+
{
43+
$suite = $this->createMock(\PHPUnit\Framework\TestSuite::class);
44+
$suite->expects($this->once())->method('injectFilter');
45+
$suite->expects($this->once())->method('run');
46+
47+
return $suite;
48+
}
49+
}

0 commit comments

Comments
 (0)