Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit 6bbbeec

Browse files
authored
Use PHPUnit polyfill (#29)
1 parent 9c3db55 commit 6bbbeec

File tree

6 files changed

+5
-78
lines changed

6 files changed

+5
-78
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"php": "^5.5 || ^7.0",
1414
"phpunit/phpunit": "~4.0.0 || ~4.1.0 || ~4.2.0 || ~4.3.0 || ~4.4.0 || ~4.5.0 || ~4.6.0 || ~4.8.0 || ~5.3.0 || ~5.4.0 || ~5.5.0 || ~5.6.0 || ~5.7.0 || ~6.0.0 || ~6.1.0 || ~6.2.0 || ~6.3.0 || ~6.4.0 || ~6.5.0 || ~7.0.0"
1515
},
16+
"require-dev": {
17+
"phpunitgoodpractices/polyfill": "^1.0"
18+
},
1619
"conflict": {
1720
"hhvm": "*"
1821
},

tests/PolyfillTrait.php

Lines changed: 0 additions & 36 deletions
This file was deleted.

tests/PolyfillTrait7.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

tests/ProphecyOverMockObjectTraitTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use PHPUnit\Framework\Error\Warning;
1515
use PHPUnit\Framework\TestCase;
16+
use PHPUnitGoodPractices\Polyfill\PolyfillTrait;
1617
use PHPUnitGoodPractices\Traits\ProphecyOverMockObjectTrait;
1718

1819
/**

tests/ProphesizeOnlyInterfaceTraitTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use PHPUnit\Framework\Error\Warning;
1515
use PHPUnit\Framework\TestCase;
16+
use PHPUnitGoodPractices\Polyfill\PolyfillTrait;
1617
use PHPUnitGoodPractices\Traits\ProphesizeOnlyInterfaceTrait;
1718

1819
interface FixtureInterface

tests/bootstrap.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,6 @@
99
* with this source code in the file LICENSE.
1010
*/
1111

12-
if (!class_exists('PHPUnit\Framework\Error\Warning')) {
13-
class_alias('PHPUnit_Framework_Error_Warning', 'PHPUnit\Framework\Error\Warning');
14-
}
15-
16-
if (!class_exists('PHPUnit\Framework\ExpectationFailedException')) {
17-
class_alias('PHPUnit_Framework_ExpectationFailedException', 'PHPUnit\Framework\ExpectationFailedException');
18-
}
19-
20-
if (!class_exists('PHPUnit\Framework\TestCase')) {
21-
class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\Framework\TestCase');
22-
}
23-
24-
if (!class_exists('PHPUnit\Runner\Version')) {
25-
class_alias('PHPUnit_Runner_Version', 'PHPUnit\Runner\Version');
26-
}
27-
2812
if (
2913
PHP_VERSION_ID >= 70200 && version_compare(PHPUnit\Runner\Version::id(), '4.1') < 0
3014
) {

0 commit comments

Comments
 (0)