Example #1
0
 public function testAccessors()
 {
     $path = '/foo/bar';
     $callback = function () {
     };
     $method = Route::HTTP_GET;
     $before = [function () {
     }];
     $after = [function () {
     }];
     $name = "foo";
     $route = new Route($path, $callback, $method, $before, $after, $name);
     $this->assertSame($path, $route->getPath());
     $this->assertSame($callback, $route->getCallback());
     $this->assertSame($method, $route->getMethod());
     $this->assertSame($before, $route->getBefore());
     $this->assertSame($after, $route->getAfter());
     $this->assertSame($name, $route->getName());
 }