Esempio n. 1
0
 public function testRouteWithModule()
 {
     Routes::get('/News/:news_id/Articles/:article_id', ['module' => 'Entry', 'controller' => 'NewsArticle', 'action' => 'show']);
     $route = Routes::getInstance()->parse('GET', '/News/technology/Articles/123');
     $this->assertEquals('Entry', $route['module']);
     $this->assertEquals('NewsArticle', $route['controller']);
     $this->assertEquals('show', $route['action']);
     $this->assertEquals(['news_id' => 'technology', 'article_id' => '123'], $route['args']);
 }