Skip to content

Commit

Permalink
Merge pull request #59 from Codeception/test-phpunit-8
Browse files Browse the repository at this point in the history
PhpUnit 8 support
  • Loading branch information
Naktibalda authored Feb 21, 2019
2 parents 3c0da1e + ab9ba19 commit e963542
Show file tree
Hide file tree
Showing 13 changed files with 1,926 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
language: php

env:
CODECEPTION_VERSION: '2.5.x-dev'
CODECEPTION_VERSION: '2.6.x-dev'

php:
- 7.1
- 7.2
- 7.3

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
}
],
"require": {
"phpunit/phpunit": ">=7.1 <7.6",
"phpunit/php-code-coverage": "^6.0",
"phpunit/phpunit": "^8.0",
"phpunit/php-code-coverage": "^7.0",
"sebastian/comparator": "^3.0",
"sebastian/diff": "^3.0"
},
Expand Down
1 change: 0 additions & 1 deletion src/Constraint/JsonContains.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ class JsonContains extends \PHPUnit\Framework\Constraint\Constraint

public function __construct(array $expected)
{
parent::__construct();
$this->expected = $expected;
}

Expand Down
1 change: 0 additions & 1 deletion src/Constraint/JsonType.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class JsonType extends \PHPUnit\Framework\Constraint\Constraint

public function __construct(array $jsonType, $match = true)
{
parent::__construct();
$this->jsonType = $jsonType;
$this->match = $match;
}
Expand Down
1 change: 0 additions & 1 deletion src/Constraint/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class Page extends \PHPUnit\Framework\Constraint\Constraint

public function __construct($string, $uri = '')
{
parent::__construct();
$this->string = $this->normalizeText((string)$string);
$this->uri = $uri;
}
Expand Down
3 changes: 2 additions & 1 deletion src/FilterTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
namespace Codeception\PHPUnit;

use Codeception\PHPUnit\NonFinal\NameFilterIterator;
use Codeception\Test\Descriptor;

/**
Expand All @@ -9,7 +10,7 @@
* Class FilterTest
* @package Codeception\PHPUnit
*/
class FilterTest extends \PHPUnit\Runner\Filter\NameFilterIterator
class FilterTest extends NameFilterIterator
{
public function accept():bool
{
Expand Down
2 changes: 1 addition & 1 deletion src/Log/JUnit.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Codeception\Test\Test;
use PHPUnit\Framework\TestCase;

class JUnit extends \PHPUnit\Util\Log\JUnit
class JUnit extends \Codeception\PHPUnit\NonFinal\JUnit
{
protected $strictAttributes = ['file', 'name', 'class'];

Expand Down
2 changes: 1 addition & 1 deletion src/Log/PhpUnit.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\TestSuite;

class PhpUnit extends \PHPUnit\Util\Log\JUnit
class PhpUnit extends \Codeception\PHPUnit\NonFinal\JUnit
{
const SUITE_LEVEL = 1;
const FILE_LEVEL = 2;
Expand Down
Loading

0 comments on commit e963542

Please sign in to comment.