Skip to content

Commit 18c0cfd

Browse files
authored
Merge pull request #21 from php-http/phpunit6
Make FeatureTestListener PHPUnit 6 compatible
2 parents 10484ce + 08b5b93 commit 18c0cfd

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Change Log
22

33

4+
## UNRELEASED
5+
6+
### Changed
7+
8+
- Make the test suite PHPUnit 6 compatible
9+
10+
411
## 0.5.1 - 2016-07-18
512

613
### Fixed

src/FeatureTestListener.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
namespace Http\Client\Tests;
44

5-
class FeatureTestListener extends \PHPUnit_TextUI_ResultPrinter
5+
use PHPUnit\Framework\Test;
6+
use PHPUnit\TextUI\ResultPrinter;
7+
8+
class FeatureTestListener extends ResultPrinter
69
{
710
public function write($buffer)
811
{
912
}
1013

11-
public function startTest(\PHPUnit_Framework_Test $test)
14+
public function startTest(Test $test)
1215
{
1316
$feature = $this->extractFeature($test);
1417

@@ -21,7 +24,7 @@ public function startTest(\PHPUnit_Framework_Test $test)
2124
echo sprintf('%-40.s : ', $feature);
2225
}
2326

24-
public function endTest(\PHPUnit_Framework_Test $test, $time)
27+
public function endTest(Test $test, $time)
2528
{
2629
if (!$this->lastTestFailed) {
2730
echo $this->formatWithColor('fg-green', 'Supported')."\n";
@@ -32,7 +35,7 @@ public function endTest(\PHPUnit_Framework_Test $test, $time)
3235
$this->lastTestFailed = false;
3336
}
3437

35-
private function extractFeature(\PHPUnit_Framework_Test $test)
38+
private function extractFeature(Test $test)
3639
{
3740
$class = get_class($test);
3841
$method = $test->getName();

0 commit comments

Comments
 (0)