Skip to content

Commit

Permalink
Merge pull request #63 from ruudk/phpunit
Browse files Browse the repository at this point in the history
Upgraded phpunit to allow 5.7 and 6.0
  • Loading branch information
cmodijk authored Dec 3, 2017
2 parents b349c80 + 4b7b3bb commit 31e5d3d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"symfony/monolog-bundle": "For logging messages"
},
"require-dev": {
"phpunit/phpunit": "~4.0 || ~5.0",
"phpunit/phpunit": "^5.7 || ^6.0",
"simple-bus/doctrine-orm-bridge": "~5.0",
"doctrine/orm": "~2.3",
"doctrine/doctrine-bundle": "~1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\HttpKernel\Kernel;

class ConfigureMiddlewaresTest extends \PHPUnit_Framework_TestCase
class ConfigureMiddlewaresTest extends \PHPUnit\Framework\TestCase
{
/**
* @var ContainerBuilder
Expand Down
7 changes: 7 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@
require __DIR__ . '/../vendor/autoload.php';

AnnotationRegistry::registerLoader('class_exists');

// Polyfill PHPUnit 6.0 both ways
if (!class_exists('\PHPUnit\Framework\TestCase', true)) {
class_alias('\PHPUnit_Framework_TestCase', '\PHPUnit\Framework\TestCase');
} elseif (!class_exists('\PHPUnit_Framework_TestCase', true)) {
class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase');
}

0 comments on commit 31e5d3d

Please sign in to comment.