Example #1
0
 /**
  * @param Route $route The unparsed route whose properties we are copying
  */
 public function __construct(Route $route)
 {
     parent::__construct($route->getMethods(), $route->getRawPath(), $route->getController());
     $this->setName($route->getName());
     $this->setRawHost($route->getRawHost());
     $this->addMiddleware($route->getMiddleware());
     $this->setSecure($route->isSecure());
     $this->setVarRegexes($route->varRegexes);
 }
Example #2
0
 /**
  * @test
  */
 public function methodGetsReturnedInCapitalLetters()
 {
     $route = new Route('get', '/', 'test');
     $this->assertSame(['GET'], $route->getMethods());
 }