/** * Test if named route exists * * Pre-conditions: * Slim app instantiated; * Named route created; * * Post-conditions: * Named route found to exist; * Non-existant route found not to exist; */ public function testHasNamedRoute() { $router = new Slim_Router($this->req, $this->res); $route = $router->map('/foo', function () { })->via('GET'); $router->addNamedRoute('foo', $route); $this->assertTrue($router->hasNamedRoute('foo')); $this->assertFalse($router->hasNamedRoute('bar')); }