public function testCompileWithParameters() { $ut = new UrlTools(); $compiled = $ut->compile("/not-a-match/{id}/{name}/junk", array("id" => "\\d+")); $this->assertEquals("#^/not-a-match/(?<id>\\d+)/(?<name>[^/]+)/junk\$#", $compiled); }