public function testRoutingTable() { $routingTable = $this->router->getRoutingTable(); $this->assertCount(2, $routingTable); $this->assertEquals('GET', $routingTable[0]['method']); $this->assertEquals('\\Phprest\\Stub\\Controller\\Routed::getFoo', $routingTable[0]['handler']); $this->assertEquals('/{version:(?:1\\.[2-9])|(?:2\\.[0-8])}/foos/{id}', $routingTable[0]['route']); $this->assertEquals('POST', $routingTable[1]['method']); $this->assertEquals('\\Phprest\\Stub\\Controller\\Routed::postBar', $routingTable[1]['handler']); $this->assertEquals('/{version:(?:0\\.[5-7])}/bars', $routingTable[1]['route']); }
/** * @param StrategyInterface $strategy */ public function setRouterStrategy(StrategyInterface $strategy) { $this->router->setStrategy($strategy); }