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 @@ -275,7 +275,7 @@ public function testAddGetCompilerPass()
275275 $ builder = new ContainerBuilder ();
276276 $ builder ->setResourceTracking (false );
277277 $ builderCompilerPasses = $ builder ->getCompiler ()->getPassConfig ()->getPasses ();
278- $ builder ->addCompilerPass ($ this ->getMock ('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface ' ));
278+ $ builder ->addCompilerPass ($ this ->getMockBuilder ('Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface ' )-> getMock ( ));
279279
280280 $ this ->assertCount (count ($ builder ->getCompiler ()->getPassConfig ()->getPasses ()) - 1 , $ builderCompilerPasses );
281281 }
@@ -658,7 +658,7 @@ public function testExtension()
658658
659659 public function testRegisteredButNotLoadedExtension ()
660660 {
661- $ extension = $ this ->getMock ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' );
661+ $ extension = $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' )-> getMock ( );
662662 $ extension ->expects ($ this ->once ())->method ('getAlias ' )->will ($ this ->returnValue ('project ' ));
663663 $ extension ->expects ($ this ->never ())->method ('load ' );
664664
@@ -670,7 +670,7 @@ public function testRegisteredButNotLoadedExtension()
670670
671671 public function testRegisteredAndLoadedExtension ()
672672 {
673- $ extension = $ this ->getMock ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' );
673+ $ extension = $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\Extension \\ExtensionInterface ' )-> getMock ( );
674674 $ extension ->expects ($ this ->exactly (2 ))->method ('getAlias ' )->will ($ this ->returnValue ('project ' ));
675675 $ extension ->expects ($ this ->once ())->method ('load ' )->with (array (array ('foo ' => 'bar ' )));
676676
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