File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Filter options
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()
21
21
{
22
22
$ routeLoader = $ this ->getMock ('Symfony\Component\Routing\Loader\RouteLoaderInterface ' );
23
23
24
- $ container = $ this ->getMock ( ' Symfony \\ Component \\ DependencyInjection \\ ContainerInterface ' , array ( ' get ' ) );
24
+ $ container = $ this ->getMockedContainer ( );
25
25
26
26
$ container
27
27
->expects ($ this ->any ())
@@ -58,7 +58,7 @@ public function testExceptionOnInterfaceNotImplemented()
58
58
// anything that doesn't implement the interface
59
59
$ routeLoader = new \stdClass ();
60
60
61
- $ container = $ this ->getMock ( ' Symfony \\ Component \\ DependencyInjection \\ ContainerInterface ' , array ( ' get ' ) );
61
+ $ container = $ this ->getMockedContainer ( );
62
62
63
63
$ container
64
64
->expects ($ this ->once ())
@@ -69,4 +69,11 @@ public function testExceptionOnInterfaceNotImplemented()
69
69
$ serviceRouteLoader = new ServiceRouterLoader ($ container );
70
70
$ serviceRouteLoader ->load ('any_service_name ' , 'service ' );
71
71
}
72
+
73
+ private function getMockedContainer ()
74
+ {
75
+ return $ this ->getMockBuilder ('Symfony \\Component \\DependencyInjection \\ContainerInterface ' )
76
+ //->setMethods(array('get'))
77
+ ->getMockForAbstractClass ();
78
+ }
72
79
}
You can’t perform that action at this time.
0 commit comments