public function testMixedMatches() { $route = new Route(); $route->setPath('/orders/show/:yearStart/:yearEnd'); $route->setMapClass('orders'); $route->setMapMethod('show_range'); $route->addDynamicElement(':yearStart', '^[1-9]{1}\\d{3}$'); $route->addDynamicElement(':yearEnd', '^[1-9]{1}\\d{3}$'); $this->assertTrue($route->matchMap('/orders/show/2008/2009')); $this->assertFalse($route->matchMap('/orders/show/0008/2009/')); $this->assertFalse($route->matchMap('/orders/show/2008/2009/')); $this->assertFalse($route->matchMap('/orders/show/all/them')); $this->assertFalse($route->matchMap('/orders/show/1999/them')); }