@@ -22,7 +22,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase
22
22
23
23
protected function setUp ()
24
24
{
25
- $ this ->loader = $ this ->getMock ('Symfony\Component\Config\Loader\LoaderInterface ' );
25
+ $ this ->loader = $ this ->getMockBuilder ('Symfony\Component\Config\Loader\LoaderInterface ' )-> getMock ( );
26
26
$ this ->router = new Router ($ this ->loader , 'routing.yml ' );
27
27
}
28
28
@@ -82,7 +82,7 @@ public function testThatRouteCollectionIsLoaded()
82
82
{
83
83
$ this ->router ->setOption ('resource_type ' , 'ResourceType ' );
84
84
85
- $ routeCollection = $ this ->getMock ('Symfony\Component\Routing\RouteCollection ' );
85
+ $ routeCollection = $ this ->getMockBuilder ('Symfony\Component\Routing\RouteCollection ' )-> getMock ( );
86
86
87
87
$ this ->loader ->expects ($ this ->once ())
88
88
->method ('load ' )->with ('routing.yml ' , 'ResourceType ' )
@@ -100,7 +100,7 @@ public function testMatcherIsCreatedIfCacheIsNotConfigured($option)
100
100
101
101
$ this ->loader ->expects ($ this ->once ())
102
102
->method ('load ' )->with ('routing.yml ' , null )
103
- ->will ($ this ->returnValue ($ this ->getMock ('Symfony\Component\Routing\RouteCollection ' )));
103
+ ->will ($ this ->returnValue ($ this ->getMockBuilder ('Symfony\Component\Routing\RouteCollection ' )-> getMock ( )));
104
104
105
105
$ this ->assertInstanceOf ('Symfony \\Component \\Routing \\Matcher \\UrlMatcher ' , $ this ->router ->getMatcher ());
106
106
}
@@ -122,7 +122,7 @@ public function testGeneratorIsCreatedIfCacheIsNotConfigured($option)
122
122
123
123
$ this ->loader ->expects ($ this ->once ())
124
124
->method ('load ' )->with ('routing.yml ' , null )
125
- ->will ($ this ->returnValue ($ this ->getMock ('Symfony\Component\Routing\RouteCollection ' )));
125
+ ->will ($ this ->returnValue ($ this ->getMockBuilder ('Symfony\Component\Routing\RouteCollection ' )-> getMock ( )));
126
126
127
127
$ this ->assertInstanceOf ('Symfony \\Component \\Routing \\Generator \\UrlGenerator ' , $ this ->router ->getGenerator ());
128
128
}
@@ -137,7 +137,7 @@ public function provideGeneratorOptionsPreventingCaching()
137
137
138
138
public function testMatchRequestWithUrlMatcherInterface ()
139
139
{
140
- $ matcher = $ this ->getMock ('Symfony\Component\Routing\Matcher\UrlMatcherInterface ' );
140
+ $ matcher = $ this ->getMockBuilder ('Symfony\Component\Routing\Matcher\UrlMatcherInterface ' )-> getMock ( );
141
141
$ matcher ->expects ($ this ->once ())->method ('match ' );
142
142
143
143
$ p = new \ReflectionProperty ($ this ->router , 'matcher ' );
@@ -149,7 +149,7 @@ public function testMatchRequestWithUrlMatcherInterface()
149
149
150
150
public function testMatchRequestWithRequestMatcherInterface ()
151
151
{
152
- $ matcher = $ this ->getMock ('Symfony\Component\Routing\Matcher\RequestMatcherInterface ' );
152
+ $ matcher = $ this ->getMockBuilder ('Symfony\Component\Routing\Matcher\RequestMatcherInterface ' )-> getMock ( );
153
153
$ matcher ->expects ($ this ->once ())->method ('matchRequest ' );
154
154
155
155
$ p = new \ReflectionProperty ($ this ->router , 'matcher ' );
0 commit comments