Skip to content

Commit

Permalink
phpunit 7
Browse files Browse the repository at this point in the history
  • Loading branch information
goetas committed Nov 11, 2018
1 parent ffcdc17 commit 746e769
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"symfony/expression-language": "~3.0 || ~4.0"
},
"require-dev": {
"phpunit/phpunit": "~5",
"phpunit/phpunit": "^7",
"symfony/yaml": "~3.0 || ~4.0",
"symfony/routing": "~3.0 || ~4.0",
"symfony/dependency-injection": "~3.0 || ~4.0",
Expand Down
1 change: 0 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="tests/bootstrap.php"
>
<testsuites>
Expand Down
3 changes: 2 additions & 1 deletion tests/Hateoas/Tests/Expression/LinkExpressionFunctionTes.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

use Hateoas\Expression\ExpressionEvaluator;
use Hateoas\Expression\LinkExpressionFunction;
use Hateoas\Tests\TestCase;
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;

class LinkExpressionFunctionTest extends \PHPUnit_Framework_TestCase
class LinkExpressionFunctionTest extends TestCase
{
public function testEvaluate()
{
Expand Down
9 changes: 4 additions & 5 deletions tests/Hateoas/Tests/Factory/LinkFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ public function testRouteRequiresGenerator()

$linkFactory = new LinkFactory($urlGeneratorRegistry, $expressionEvaluator);

$this->setExpectedException('RuntimeException', 'You cannot use a route without an url generator.');
$this->expectException('RuntimeException');
$this->expectExceptionMessage('You cannot use a route without an url generator.');

$linkFactory->createLink(
new TestedObject(),
Expand All @@ -102,10 +103,8 @@ public function testRouteParamatersNotArray()
{
$linkFactory = $this->createLinkFactory();

$this->setExpectedException(
'RuntimeException',
'The route parameters should be an array, string given. Maybe you forgot to wrap the expression in expr(...).'
);
$this->expectException('RuntimeException');
$this->expectExceptionMessage('The route parameters should be an array, string given. Maybe you forgot to wrap the expression in expr(...).');

$linkFactory->createLink(
new TestedObject(),
Expand Down
2 changes: 1 addition & 1 deletion tests/Hateoas/Tests/HateoasTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Hateoas\UrlGenerator\CallableUrlGenerator;
use Hateoas\Tests\Fixtures\Will;

class HateoasTest extends \PHPUnit_Framework_TestCase
class HateoasTest extends TestCase
{
private $hateoas;

Expand Down
3 changes: 2 additions & 1 deletion tests/Hateoas/Tests/Helper/LinkHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
use Hateoas\Configuration\Route;
use Hateoas\HateoasBuilder;
use Hateoas\Helper\LinkHelper;
use Hateoas\Tests\TestCase;
use Hateoas\UrlGenerator\CallableUrlGenerator;
use Hateoas\Tests\Fixtures\Will;

class LinkHelperTest extends \PHPUnit_Framework_TestCase
class LinkHelperTest extends TestCase
{
private $hateoas;

Expand Down
2 changes: 1 addition & 1 deletion tests/Hateoas/Tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Hateoas\Tests;

abstract class TestCase extends \PHPUnit_Framework_TestCase
abstract class TestCase extends \PHPUnit\Framework\TestCase
{
public static function rootPath()
{
Expand Down

0 comments on commit 746e769

Please sign in to comment.