Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPUnit v6 compatibility #130

Merged
merged 1 commit into from
Nov 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"symfony/validator": "^2.7 || ^3.0"
},
"require-dev": {
"matthiasnoback/symfony-dependency-injection-test": "^0.7.4",
"matthiasnoback/symfony-dependency-injection-test": "^1.0.1 || ^2.0",
"sebastian/exporter": "^1.2.0",
"silex/silex": "^1.2 || ^2.0",
"sllh/php-cs-fixer-styleci-bridge": "^1.0",
Expand Down Expand Up @@ -45,6 +45,11 @@
"psr-4": { "SLLH\\IsoCodesValidator\\Tests\\": "tests" },
"psr-0": { "IsoCodes\\Tests\\": "vendor/ronanguilloux/isocodes/tests" }
},
"scripts": {
"isocodes-test-namespace": "sed -i 's/PHPUnit_Framework_TestCase/PHPUnit\\\\Framework\\\\TestCase/' vendor/ronanguilloux/isocodes/tests/IsoCodes/Tests/AbstractIsoCodeTest.php",
"post-install-cmd": "@isocodes-test-namespace",
"post-update-cmd": "@isocodes-test-namespace"
},
"config": {
"sort-packages": true
},
Expand Down
3 changes: 2 additions & 1 deletion tests/AbstractIsoCodeGenericConstraintTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SLLH\IsoCodesValidator\Tests;

use PHPUnit\Framework\TestCase;
use SLLH\IsoCodesValidator\AbstractIsoCodesGenericConstraint;
use SLLH\IsoCodesValidator\Constraints\Bban;
use SLLH\IsoCodesValidator\Constraints\Cif;
Expand All @@ -11,7 +12,7 @@
/**
* @author Sullivan Senechal <[email protected]>
*/
final class AbstractIsoCodeGenericConstraintTest extends \PHPUnit_Framework_TestCase
final class AbstractIsoCodeGenericConstraintTest extends TestCase
{
/**
* @dataProvider getGenericConstraints
Expand Down
3 changes: 2 additions & 1 deletion tests/Bridge/Silex/IsoCodesValidatorServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace SLLH\IsoCodesValidator\Tests\Bridge\Silex;

use PHPUnit\Framework\TestCase;
use Silex\Application;
use Silex\Provider\LocaleServiceProvider;
use Silex\Provider\TranslationServiceProvider;
Expand All @@ -12,7 +13,7 @@
/**
* @author Sullivan Senechal <[email protected]>
*/
final class IsoCodesValidatorServiceProviderTest extends \PHPUnit_Framework_TestCase
final class IsoCodesValidatorServiceProviderTest extends TestCase
{
public function testRegisterAndBoot()
{
Expand Down
3 changes: 2 additions & 1 deletion tests/Constraints/AbstractConstraintValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use SLLH\IsoCodesValidator\ConstraintInterface;
use SLLH\IsoCodesValidator\Constraints\IsoCodesGenericValidator;
use Symfony\Component\Validator\Constraints\Blank;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest as BaseAbstractConstraintValidatorTest;
use Symfony\Component\Validator\Validation;

Expand Down Expand Up @@ -35,7 +36,7 @@ protected function getApiVersion()

public function testUnexpectedConstraintException()
{
$this->setExpectedException('Symfony\Component\Validator\Exception\UnexpectedTypeException');
$this->expectException(UnexpectedTypeException::class);

$this->validator->validate(null, new Blank());
}
Expand Down
3 changes: 2 additions & 1 deletion tests/Constraints/IsbnTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

namespace SLLH\IsoCodesValidator\Tests\Constraints;

use PHPUnit\Framework\TestCase;
use SLLH\IsoCodesValidator\Constraints\Isbn;

final class IsbnTest extends \PHPUnit_Framework_TestCase
final class IsbnTest extends TestCase
{
/**
* @dataProvider getValidTypes
Expand Down
3 changes: 2 additions & 1 deletion tests/Constraints/ZipCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

namespace SLLH\IsoCodesValidator\Tests\Constraints;

use PHPUnit\Framework\TestCase;
use SLLH\IsoCodesValidator\Constraints\ZipCode;

final class ZipCodeTest extends \PHPUnit_Framework_TestCase
final class ZipCodeTest extends TestCase
{
/**
* @dataProvider getValidCountries
Expand Down