/** * @covers Respect\Rest\Router::__call * @covers Respect\Rest\Router::staticRoute * @dataProvider provideForStaticRoutableValues */ public function testMagicConstructorCanRouteToStaticValue($staticValue, $reason) { $router = new Router(); $router->isAutoDispatched = false; // prevent static content from being echoed on dispatch $staticRoute = $router->get('/', $staticValue); $concreteStaticRoute = $router->staticRoute('GET', '/', $staticValue); $this->assertInstanceOf('Respect\\Rest\\Routes\\StaticValue', $staticRoute, $reason); $this->assertEquals($staticRoute, $concreteStaticRoute, 'The magic and concrete instances of Routes\\Static should be equivalent'); }