Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit b90b945

Browse files
authored
Merge pull request #2 from Codeception/6.0
fixed for phpunit 6
2 parents 5725335 + 164e896 commit b90b945

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.idea
2+
composer.lock
23
vendor

src/Constraint/JsonType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function matches($jsonArray) : bool
3939
}
4040
} else {
4141
if ($matched === true) {
42-
throw new \PHPUnit\Framework\ExpectationFailedException('Unexpectedly response matched: ' . json\encode($jsonArray));
42+
throw new \PHPUnit\Framework\ExpectationFailedException('Unexpectedly response matched: ' . json_encode($jsonArray));
4343
}
4444
}
4545
return true;

src/shim.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ class_alias('PHP_CodeCoverage_Exception', 'SebastianBergmann\CodeCoverage\Except
6363
class_alias('PHP_Timer', 'SebastianBergmann\Timer\Timer');
6464
}
6565

66+
if (!class_exists('\PHPUnit\Framework\Constraint\LogicalNot') && class_exists('\PHPUnit\Framework\Constraint\Not')) {
67+
class_alias('\PHPUnit\Framework\Constraint\Not', '\PHPUnit\Framework\Constraint\LogicalNot');
68+
}
6669
}
6770

6871
// @codingStandardsIgnoreEnd

0 commit comments

Comments
 (0)