/** * Route should set name */ public function testRouteSetsName() { $route = new \Slim\Route('/foo/bar', function () { }); $route->name('foo'); $this->assertEquals('foo', $route->getName()); }
public function testSetName() { $route = new \Slim\Route('/foo', function () { }); $route->name('foo'); // <-- Alias for `setName()` $this->assertAttributeEquals('foo', 'name', $route); }