/**
* @dataProvider getValidRoutes
* @covers Imbo\Router::route
*/
public function testCanMatchValidRoutes($route, $resource, $user = null, $imageIdentifier = null, $extension = null)
{
$this->request->expects($this->once())->method('getPathInfo')->will($this->returnValue($route));
$this->request->expects($this->once())->method('getMethod')->will($this->returnValue('GET'));
$this->router->route($this->request);
$route = $this->request->getRoute();
$this->assertSame($user, $route->get('user'));
$this->assertSame($imageIdentifier, $route->get('imageIdentifier'));
$this->assertSame($extension, $route->get('extension'));
$this->assertSame($resource, (string) $route);
}