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