Skip to content

Commit fce0299

Browse files
bug symfony#19129 Avoid phpunit 5.4 warnings on getMock (master) (iltar)
This PR was merged into the 3.2-dev branch. Discussion ---------- Avoid phpunit 5.4 warnings on getMock (master) | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#19125 | License | MIT | Doc PR | ~ Avoids calling `getMock()` in phpunit 5.4 which will trigger a warning (and thus failing test suite) when used by developers as this TestCase is an extension point. _in the other branches (opposed to symfony#19128), this was not in the `Test` namespace yet but in `Tests`. Therefore I've only added this in the master as changed by @wouterj in e938361._ Commits ------- eb8c27e Avoid phpunit 5.4 warnings on getMock
2 parents 26eca5d + eb8c27e commit fce0299

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Validator/Test/ConstraintValidatorTestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ protected function restoreDefaultTimezone()
9393

9494
protected function createContext()
9595
{
96-
$translator = $this->getMock('Symfony\Component\Translation\TranslatorInterface');
97-
$validator = $this->getMock('Symfony\Component\Validator\Validator\ValidatorInterface');
98-
$contextualValidator = $this->getMock('Symfony\Component\Validator\Validator\ContextualValidatorInterface');
96+
$translator = $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock();
97+
$validator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ValidatorInterface')->getMock();
98+
$contextualValidator = $this->getMockBuilder('Symfony\Component\Validator\Validator\ContextualValidatorInterface')->getMock();
9999

100100
$context = new ExecutionContext($validator, $this->root, $translator);
101101
$context->setGroup($this->group);

0 commit comments

Comments
 (0)