bug #19128 Avoid phpunit 5.4 warnings on getMock (2.7+) (iltar)

This PR was merged into the 2.7 branch.

Discussion
----------

Avoid phpunit 5.4 warnings on getMock (2.7+)

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #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.

Commits
-------

b05014c Avoid phpunit 5.4 warnings on getMock
This commit is contained in:
Nicolas Grekas 2016-06-21 15:39:41 +02:00
commit a65fe45ec9
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ abstract class TypeTestCase extends FormIntegrationTestCase
{
parent::setUp();
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock();
$this->builder = new FormBuilder(null, null, $this->dispatcher, $this->factory);
}