@@ -21,9 +21,9 @@ class RouterCacheWarmerTest extends TestCase
21
21
{
22
22
public function testWarmUpWithWarmebleInterface ()
23
23
{
24
- $ containerMock = $ this ->getMockBuilder (ContainerInterface::class)->setMethods (['get ' , 'has ' ])->getMock ();
24
+ $ containerMock = $ this ->getMockBuilder (ContainerInterface::class)->onlyMethods (['get ' , 'has ' ])->getMock ();
25
25
26
- $ routerMock = $ this ->getMockBuilder (testRouterInterfaceWithWarmebleInterface::class)->setMethods (['match ' , 'generate ' , 'getContext ' , 'setContext ' , 'getRouteCollection ' , 'warmUp ' ])->getMock ();
26
+ $ routerMock = $ this ->getMockBuilder (testRouterInterfaceWithWarmebleInterface::class)->onlyMethods (['match ' , 'generate ' , 'getContext ' , 'setContext ' , 'getRouteCollection ' , 'warmUp ' ])->getMock ();
27
27
$ containerMock ->expects ($ this ->any ())->method ('get ' )->with ('router ' )->willReturn ($ routerMock );
28
28
$ routerCacheWarmer = new RouterCacheWarmer ($ containerMock );
29
29
@@ -34,9 +34,9 @@ public function testWarmUpWithWarmebleInterface()
34
34
35
35
public function testWarmUpWithoutWarmebleInterface ()
36
36
{
37
- $ containerMock = $ this ->getMockBuilder (ContainerInterface::class)->setMethods (['get ' , 'has ' ])->getMock ();
37
+ $ containerMock = $ this ->getMockBuilder (ContainerInterface::class)->onlyMethods (['get ' , 'has ' ])->getMock ();
38
38
39
- $ routerMock = $ this ->getMockBuilder (testRouterInterfaceWithoutWarmebleInterface::class)->setMethods (['match ' , 'generate ' , 'getContext ' , 'setContext ' , 'getRouteCollection ' ])->getMock ();
39
+ $ routerMock = $ this ->getMockBuilder (testRouterInterfaceWithoutWarmebleInterface::class)->onlyMethods (['match ' , 'generate ' , 'getContext ' , 'setContext ' , 'getRouteCollection ' ])->getMock ();
40
40
$ containerMock ->expects ($ this ->any ())->method ('get ' )->with ('router ' )->willReturn ($ routerMock );
41
41
$ routerCacheWarmer = new RouterCacheWarmer ($ containerMock );
42
42
$ this ->expectException (\LogicException::class);
0 commit comments