@@ -284,8 +284,8 @@ public function testAddGetCompilerPass()
284
284
$ builder = new ContainerBuilder ();
285
285
$ builder ->setResourceTracking (false );
286
286
$ defaultPasses = $ builder ->getCompiler ()->getPassConfig ()->getPasses ();
287
- $ builder ->addCompilerPass ($ pass1 = $ this ->getMock ('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface ' ), PassConfig::TYPE_BEFORE_OPTIMIZATION , -5 );
288
- $ builder ->addCompilerPass ($ pass2 = $ this ->getMock ('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface ' ), PassConfig::TYPE_BEFORE_OPTIMIZATION , 10 );
287
+ $ builder ->addCompilerPass ($ pass1 = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface ' )-> getMock ( ), PassConfig::TYPE_BEFORE_OPTIMIZATION , -5 );
288
+ $ builder ->addCompilerPass ($ pass2 = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface ' )-> getMock ( ), PassConfig::TYPE_BEFORE_OPTIMIZATION , 10 );
289
289
290
290
$ passes = $ builder ->getCompiler ()->getPassConfig ()->getPasses ();
291
291
$ this ->assertCount (count ($ passes ) - 2 , $ defaultPasses );
@@ -648,7 +648,7 @@ public function testExtension()
648
648
649
649
public function testRegisteredButNotLoadedExtension ()
650
650
{
651
- $ extension = $ this ->getMock ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' );
651
+ $ extension = $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' )-> getMock ( );
652
652
$ extension ->expects ($ this ->once ())->method ('getAlias ' )->will ($ this ->returnValue ('project ' ));
653
653
$ extension ->expects ($ this ->never ())->method ('load ' );
654
654
@@ -660,7 +660,7 @@ public function testRegisteredButNotLoadedExtension()
660
660
661
661
public function testRegisteredAndLoadedExtension ()
662
662
{
663
- $ extension = $ this ->getMock ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' );
663
+ $ extension = $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' )-> getMock ( );
664
664
$ extension ->expects ($ this ->exactly (2 ))->method ('getAlias ' )->will ($ this ->returnValue ('project ' ));
665
665
$ extension ->expects ($ this ->once ())->method ('load ' )->with (array (array ('foo ' => 'bar ' )));
666
666
0 commit comments