Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
 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);
 }