File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/Symfony/Component/Routing/Tests/Loader Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public function testLoadCallsServiceAndReturnsCollection()
2121 {
2222 $ routeLoader = $ this ->getMock ('Symfony\Component\Routing\Loader\RouteLoaderInterface ' );
2323
24- $ container = $ this ->getMock ( ' Symfony \\ Component \\ DependencyInjection \\ ContainerInterface ' , array ( ' get ' ) );
24+ $ container = $ this ->getMockedContainer ( );
2525
2626 $ container
2727 ->expects ($ this ->any ())
@@ -58,7 +58,7 @@ public function testExceptionOnInterfaceNotImplemented()
5858 // anything that doesn't implement the interface
5959 $ routeLoader = new \stdClass ();
6060
61- $ container = $ this ->getMock ( ' Symfony \\ Component \\ DependencyInjection \\ ContainerInterface ' , array ( ' get ' ) );
61+ $ container = $ this ->getMockedContainer ( );
6262
6363 $ container
6464 ->expects ($ this ->once ())
@@ -69,4 +69,11 @@ public function testExceptionOnInterfaceNotImplemented()
6969 $ serviceRouteLoader = new ServiceRouterLoader ($ container );
7070 $ serviceRouteLoader ->load ('any_service_name ' , 'service ' );
7171 }
72+
73+ private function getMockedContainer ()
74+ {
75+ return $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\ContainerInterface ' )
76+ //->setMethods(array('get'))
77+ ->getMockForAbstractClass ();
78+ }
7279}
You can’t perform that action at this time.
0 commit comments