File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class ExtensionCompilerPassTest extends \PHPUnit_Framework_TestCase
2323
2424 protected function setUp ()
2525 {
26- $ this ->container = $ this ->getMock ('Symfony\Component\DependencyInjection\ContainerBuilder ' );
26+ $ this ->container = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\ContainerBuilder ' )-> getMock ( );
2727 $ this ->pass = new ExtensionCompilerPass ();
2828 }
2929
@@ -46,10 +46,10 @@ public function testProcess()
4646
4747 private function createExtensionMock ($ hasInlineCompile )
4848 {
49- return $ this ->getMock ('Symfony\Component\DependencyInjection \\' .(
49+ return $ this ->getMockBuilder ('Symfony\Component\DependencyInjection \\' .(
5050 $ hasInlineCompile
5151 ? 'Compiler\CompilerPassInterface '
5252 : 'Extension\ExtensionInterface '
53- ));
53+ ))-> getMock () ;
5454 }
5555}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public function testExpressionLanguageProviderForwarding()
2121 {
2222 $ tmpProviders = array ();
2323
24- $ extension = $ this ->getMock ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' );
24+ $ extension = $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' )-> getMock ( );
2525 $ extension ->expects ($ this ->any ())
2626 ->method ('getXsdValidationBasePath ' )
2727 ->will ($ this ->returnValue (false ));
@@ -37,7 +37,7 @@ public function testExpressionLanguageProviderForwarding()
3737 $ tmpProviders = $ container ->getExpressionLanguageProviders ();
3838 }));
3939
40- $ provider = $ this ->getMock ('Symfony \\Component \\ExpressionLanguage \\ExpressionFunctionProviderInterface ' );
40+ $ provider = $ this ->getMockBuilder ('Symfony \\Component \\ExpressionLanguage \\ExpressionFunctionProviderInterface ' )-> getMock ( );
4141 $ container = new ContainerBuilder (new ParameterBag ());
4242 $ container ->registerExtension ($ extension );
4343 $ container ->prependExtensionConfig ('foo ' , array ('bar ' => true ));
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ public function testAddGetCompilerPass()
254254 $ builder = new ContainerBuilder ();
255255 $ builder ->setResourceTracking (false );
256256 $ builderCompilerPasses = $ builder ->getCompiler ()->getPassConfig ()->getPasses ();
257- $ builder ->addCompilerPass ($ this ->getMock ('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface ' ));
257+ $ builder ->addCompilerPass ($ this ->getMockBuilder ('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface ' )-> getMock ( ));
258258
259259 $ this ->assertCount (count ($ builder ->getCompiler ()->getPassConfig ()->getPasses ()) - 1 , $ builderCompilerPasses );
260260 }
@@ -608,7 +608,7 @@ public function testExtension()
608608
609609 public function testRegisteredButNotLoadedExtension ()
610610 {
611- $ extension = $ this ->getMock ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' );
611+ $ extension = $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' )-> getMock ( );
612612 $ extension ->expects ($ this ->once ())->method ('getAlias ' )->will ($ this ->returnValue ('project ' ));
613613 $ extension ->expects ($ this ->never ())->method ('load ' );
614614
@@ -620,7 +620,7 @@ public function testRegisteredButNotLoadedExtension()
620620
621621 public function testRegisteredAndLoadedExtension ()
622622 {
623- $ extension = $ this ->getMock ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' );
623+ $ extension = $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' )-> getMock ( );
624624 $ extension ->expects ($ this ->exactly (2 ))->method ('getAlias ' )->will ($ this ->returnValue ('project ' ));
625625 $ extension ->expects ($ this ->once ())->method ('load ' )->with (array (array ('foo ' => 'bar ' )));
626626
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function testInstantiateProxy()
2525 {
2626 $ instantiator = new RealServiceInstantiator ();
2727 $ instance = new \stdClass ();
28- $ container = $ this ->getMock ('Symfony\Component\DependencyInjection\ContainerInterface ' );
28+ $ container = $ this ->getMockBuilder ('Symfony\Component\DependencyInjection\ContainerInterface ' )-> getMock ( );
2929 $ callback = function () use ($ instance ) {
3030 return $ instance ;
3131 };
You can’t perform that action at this time.
0 commit comments