namespace Symfony\Component\Routing\Tests;
use PHPUnit\Framework\TestCase;
+use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Router;
use Symfony\Component\HttpFoundation\Request;
{
$this->router->setOption('resource_type', 'ResourceType');
- $routeCollection = $this->getMockBuilder('Symfony\Component\Routing\RouteCollection')->getMock();
+ $routeCollection = new RouteCollection();
$this->loader->expects($this->once())
->method('load')->with('routing.yml', 'ResourceType')
$this->loader->expects($this->once())
->method('load')->with('routing.yml', null)
- ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Routing\RouteCollection')->getMock()));
+ ->will($this->returnValue(new RouteCollection()));
$this->assertInstanceOf('Symfony\\Component\\Routing\\Matcher\\UrlMatcher', $this->router->getMatcher());
}
$this->loader->expects($this->once())
->method('load')->with('routing.yml', null)
- ->will($this->returnValue($this->getMockBuilder('Symfony\Component\Routing\RouteCollection')->getMock()));
+ ->will($this->returnValue(new RouteCollection()));
$this->assertInstanceOf('Symfony\\Component\\Routing\\Generator\\UrlGenerator', $this->router->getGenerator());
}