@@ -16,13 +16,13 @@ public function testGeocode()
1616 $ coordinates = array ('lat ' => 48.857049 ,'lng ' => 2.35223 );
1717 $ cacheKey = 'geocoder_ ' .sha1 ($ address );
1818
19- $ delegate = $ this ->getMock ('Geocoder \\Provider \\Provider ' );
19+ $ delegate = $ this ->getMockBuilder ('Geocoder \\Provider \\Provider ' )-> getMock ( );
2020 $ delegate ->expects ($ this ->once ())
2121 ->method ('geocode ' )
2222 ->with ($ address )
2323 ->will ($ this ->returnValue ($ coordinates ));
2424
25- $ cache = $ this ->getMock ('Doctrine \\Common \\Cache \\Cache ' );
25+ $ cache = $ this ->getMockBuilder ('Doctrine \\Common \\Cache \\Cache ' )-> getMock ( );
2626 $ cache ->expects ($ this ->once ())
2727 ->method ('fetch ' )
2828 ->with ($ cacheKey )
@@ -42,7 +42,7 @@ public function testCachedGeocode()
4242 $ coordinates = array ('lat ' => 48.857049 ,'lng ' => 2.35223 );
4343 $ cacheKey = 'geocoder_ ' .sha1 ($ address );
4444
45- $ delegate = $ this ->getMock ('Geocoder \\Provider \\Provider ' );
45+ $ delegate = $ this ->getMockBuilder ('Geocoder \\Provider \\Provider ' )-> getMock ( );
4646 $ delegate ->expects ($ this ->once ())
4747 ->method ('geocode ' )
4848 ->with ($ address )
@@ -60,7 +60,7 @@ public function testReverse()
6060 {
6161 $ coordinates = array ('lat ' => 48.857049 , 'lon ' => 2.35223 );
6262
63- $ delegate = $ this ->getMock ('Geocoder \\Provider \\Provider ' );
63+ $ delegate = $ this ->getMockBuilder ('Geocoder \\Provider \\Provider ' )-> getMock ( );
6464 $ delegate ->expects ($ this ->once ())
6565 ->method ('reverse ' )
6666 ->with ($ coordinates ['lat ' ], $ coordinates ['lon ' ])
@@ -76,8 +76,8 @@ public function testReverse()
7676
7777 public function testGetName ()
7878 {
79- $ delegate = $ this ->getMock ('Geocoder \\Provider \\Provider ' );
80- $ cache = $ this ->getMock ('Doctrine \\Common \\Cache \\Cache ' );
79+ $ delegate = $ this ->getMockBuilder ('Geocoder \\Provider \\Provider ' )-> getMock ( );
80+ $ cache = $ this ->getMockBuilder ('Doctrine \\Common \\Cache \\Cache ' )-> getMock ( );
8181
8282 $ provider = new Cache ($ cache , $ delegate );
8383
0 commit comments