Skip to content

Commit 31e5d3d

Browse files
authored
Merge pull request #63 from ruudk/phpunit
Upgraded phpunit to allow 5.7 and 6.0
2 parents b349c80 + 4b7b3bb commit 31e5d3d

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"symfony/monolog-bundle": "For logging messages"
3333
},
3434
"require-dev": {
35-
"phpunit/phpunit": "~4.0 || ~5.0",
35+
"phpunit/phpunit": "^5.7 || ^6.0",
3636
"simple-bus/doctrine-orm-bridge": "~5.0",
3737
"doctrine/orm": "~2.3",
3838
"doctrine/doctrine-bundle": "~1.0",

tests/SymfonyBundle/DependencyInjection/Compiler/ConfigureMiddlewaresTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Symfony\Component\DependencyInjection\Definition;
1111
use Symfony\Component\HttpKernel\Kernel;
1212

13-
class ConfigureMiddlewaresTest extends \PHPUnit_Framework_TestCase
13+
class ConfigureMiddlewaresTest extends \PHPUnit\Framework\TestCase
1414
{
1515
/**
1616
* @var ContainerBuilder

tests/bootstrap.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,10 @@
55
require __DIR__ . '/../vendor/autoload.php';
66

77
AnnotationRegistry::registerLoader('class_exists');
8+
9+
// Polyfill PHPUnit 6.0 both ways
10+
if (!class_exists('\PHPUnit\Framework\TestCase', true)) {
11+
class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
12+
} elseif (!class_exists('\PHPUnit_Framework_TestCase', true)) {
13+
class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase');
14+
}

0 commit comments

Comments
 (0)