Esempio n. 1
0
 /**
  * 
  */
 public function testFromArray()
 {
     $route = Route::createFromArray(['name' => 'home', 'patterns' => 'path/to/home', 'attributes' => ['controller' => 'HomeController'], 'params' => ['id' => '\\d+'], 'conditions' => []]);
 }
Esempio n. 2
0
 /**
  * @depends testInitRouter
  */
 public function testBasicRouter($router)
 {
     $route1 = Route::createFromArray(['name' => 'home', 'patterns' => 'welcome/to/home', 'attributes' => ['controller' => 'HomeController']]);
     $route2 = $router->routes('home');
     $this->assertEquals($route1, $route2);
 }