Esempio n. 1
0
 public function testContructor()
 {
     $route = new Route('name', 'sourceRoute', 'action');
     $this->assertEquals('name', $route->getName());
     $this->assertEquals('sourceRoute', $route->getSourceRoute());
     $this->assertEquals('action', $route->getAction());
 }
Esempio n. 2
0
 /**
  * Transforms Route object to PHP array.
  * @param  Route  $route Route object to transform.
  * @return array
  */
 public function transformRouteToArray(Route $route)
 {
     return ['name' => $route->getName(), 'action' => $route->getAction(), 'rules' => $route->getRules(), 'methods' => $route->getMethods(), 'route' => $route->getRoute(), 'sourceRoute' => $route->getSourceRoute(), 'defaults' => $route->getDefaults(), 'extras' => $route->getExtras(), 'tokens' => $route->getTokens(), 'arguments' => $route->getArguments()];
 }