Skip to content

Commit ba00a73

Browse files
committed
fixed obsolete getMock() usage
1 parent cbf2eca commit ba00a73

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Tests/RouteCollectionBuilderTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class RouteCollectionBuilderTest extends \PHPUnit_Framework_TestCase
2020
{
2121
public function testImport()
2222
{
23-
$resolvedLoader = $this->getMock('Symfony\Component\Config\Loader\LoaderInterface');
24-
$resolver = $this->getMock('Symfony\Component\Config\Loader\LoaderResolverInterface');
23+
$resolvedLoader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
24+
$resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock();
2525
$resolver->expects($this->once())
2626
->method('resolve')
2727
->with('admin_routing.yml', 'yaml')
@@ -38,7 +38,7 @@ public function testImport()
3838
->with('admin_routing.yml', 'yaml')
3939
->will($this->returnValue($expectedCollection));
4040

41-
$loader = $this->getMock('Symfony\Component\Config\Loader\LoaderInterface');
41+
$loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
4242
$loader->expects($this->any())
4343
->method('getResolver')
4444
->will($this->returnValue($resolver));
@@ -89,7 +89,7 @@ public function testFlushOrdering()
8989
$importedCollection->add('imported_route1', new Route('/imported/foo1'));
9090
$importedCollection->add('imported_route2', new Route('/imported/foo2'));
9191

92-
$loader = $this->getMock('Symfony\Component\Config\Loader\LoaderInterface');
92+
$loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
9393
// make this loader able to do the import - keeps mocking simple
9494
$loader->expects($this->any())
9595
->method('supports')
@@ -252,7 +252,7 @@ public function providePrefixTests()
252252

253253
public function testFlushSetsPrefixedWithMultipleLevels()
254254
{
255-
$loader = $this->getMock('Symfony\Component\Config\Loader\LoaderInterface');
255+
$loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
256256
$routes = new RouteCollectionBuilder($loader);
257257

258258
$routes->add('homepage', 'MainController::homepageAction', 'homepage');

0 commit comments

Comments
 (0)