Skip to content

Commit fe4825c

Browse files
authored
Support PHPUnit 9 (#50)
* Support PHPUnit 9 * Run tests on PHP 7.3 and 7.4 * Made ResultPrinter compatible with PHPUnit 9
1 parent b0c5e18 commit fe4825c

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ language: php
33
php:
44
- 7.1
55
- 7.2
6+
- 7.3
7+
- 7.4
68

79
before_script:
810
- composer update

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"require": {
1313
"php": ">=7.1.0",
1414
"myclabs/deep-copy": "~1.1",
15-
"phpunit/phpunit": ">=7.0 <9.0"
15+
"phpunit/phpunit": ">=7.0 <10.0"
1616
},
1717
"autoload": {
1818
"psr-0": {

src/Codeception/Specify/ResultPrinter.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
namespace Codeception\Specify;
44

5-
class ResultPrinter extends \PHPUnit\TextUI\ResultPrinter
5+
use PHPUnit\TextUI\DefaultResultPrinter;
6+
7+
if (!class_exists(DefaultResultPrinter::class)) {
8+
class_alias(\PHPUnit\TextUI\ResultPrinter::class, DefaultResultPrinter::class);
9+
}
10+
11+
class ResultPrinter extends DefaultResultPrinter
612
{
713
/**
814
* @param string $progress

0 commit comments

Comments
 (0)