コード例 #1
0
ファイル: HttpRouteTest.php プロジェクト: rezon/sugi
 public function testDefaults()
 {
     $route = new Route("/");
     $route->setDefaults(array("constructor" => "main"));
     $this->assertEquals(array("constructor" => "main"), $route->getDefaults());
     $route->setDefaults(array("constructor" => "main", "action" => "index"));
     $this->assertEquals(array("constructor" => "main", "action" => "index"), $route->getDefaults());
     $route = new Route("/", array("constructor" => "main"));
     $this->assertEquals(array("constructor" => "main"), $route->getDefaults());
 }