public function testRemoveRoute() { $this->router->addRoute('archive', RouterTransparentRule::create('archive/:year')->setDefaults(array('year' => '2006', 'area' => 'archive', 'action' => 'show'))->setRequirements(array('year' => '\\d+'))); $route = $this->router->getRoute('archive'); $this->router->removeRoute('archive'); $routes = $this->router->getRoutes(); $this->assertEquals(0, count($routes)); try { $route = $this->router->removeRoute('archive'); } catch (RouterException $e) { $this->assertInstanceOf('RouterException', $e); return true; } $this->fail(); }