/** * */ public function testFromArray() { $route = Route::createFromArray(['name' => 'home', 'patterns' => 'path/to/home', 'attributes' => ['controller' => 'HomeController'], 'params' => ['id' => '\\d+'], 'conditions' => []]); }
/** * @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); }