From be09fd9c4e1c44a057aa106c32efe476b4e0debd Mon Sep 17 00:00:00 2001 From: Douglas Greenshields Date: Tue, 14 Mar 2017 16:47:57 +0000 Subject: [PATCH] use phpunit 5.7 for tests --- Tests/Validator/FixedLengthDigitPostalCodeValidatorTest.php | 2 +- Tests/Validator/RegexPostalCodeValidatorTest.php | 6 +++--- composer.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Tests/Validator/FixedLengthDigitPostalCodeValidatorTest.php b/Tests/Validator/FixedLengthDigitPostalCodeValidatorTest.php index a10c267..9edf602 100644 --- a/Tests/Validator/FixedLengthDigitPostalCodeValidatorTest.php +++ b/Tests/Validator/FixedLengthDigitPostalCodeValidatorTest.php @@ -12,7 +12,7 @@ class FixedLengthDigitPostalCodeValidatorTest extends \PHPUnit_Framework_TestCas protected function setUp() { $this->validator = new FixedLengthDigitPostalCodeValidator(); - $this->context = $this->getMock(ExecutionContextInterface::class); + $this->context = $this->createMock(ExecutionContextInterface::class); $this->validator->initialize($this->context); } diff --git a/Tests/Validator/RegexPostalCodeValidatorTest.php b/Tests/Validator/RegexPostalCodeValidatorTest.php index b9504b6..1204f97 100644 --- a/Tests/Validator/RegexPostalCodeValidatorTest.php +++ b/Tests/Validator/RegexPostalCodeValidatorTest.php @@ -15,8 +15,8 @@ class RegexPostalCodeValidatorTest extends \PHPUnit_Framework_TestCase { public function setUp() { - $this->regexValidator = $this->getMock(ConstraintValidatorInterface::class); - $this->notBlankValidator = $this->getMock(ConstraintValidatorInterface::class); + $this->regexValidator = $this->createMock(ConstraintValidatorInterface::class); + $this->notBlankValidator = $this->createMock(ConstraintValidatorInterface::class); $this->validator = new RegexPostalCodeValidator($this->regexValidator, $this->notBlankValidator); } @@ -29,7 +29,7 @@ public function testValidateInitializesAndDelegatesOnValidators() { $constraint = new PostalCodeConstraint(); $constraint->message = 'message'; - $context = $this->getMock(ExecutionContextInterface::class); + $context = $this->createMock(ExecutionContextInterface::class); $value = 'i am a value'; $this->regexValidator ->expects($this->at(0)) diff --git a/composer.json b/composer.json index 529be0d..c793037 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ }, "require-dev": { "symfony/validator": "~2.7|~3.0", - "phpunit/phpunit": "4.*", + "phpunit/phpunit": "~5.7", "mockery/mockery": "~0.9.0", "symfony/console": "~2.7|~3.0" },