function setUp() { parent::setUp(); $this->cache = $this->prophesize("Wilson\\Utils\\Cache"); $this->ut = $this->prophesize("Wilson\\Routing\\UrlTools"); $this->router = new Router($this->cache->reveal(), $this->ut->reveal()); }
public function testMatchWithParameters() { $ut = new UrlTools(); $a = array(); $this->assertTrue($ut->match("#^/url/(?<id>[123]+)/junk\$#", "/url/123/junk", $a)); $this->assertEquals(array("id" => "123"), $a); }