public function testMatchMVC() { // this is real world example $route = new Route("/{controller}/{action}/{param}", array("controller" => "home", "action" => "index", "param" => "")); // ok $this->assertTrue($route->matchPath("")); $this->assertTrue($route->matchPath("/")); $this->assertTrue($route->matchPath("/home")); $this->assertTrue($route->matchPath("/home/")); $this->assertTrue($route->matchPath("/home/index")); $this->assertTrue($route->matchPath("/user/edit/3")); $this->assertTrue($route->matchPath("/user/edit/ivan")); }