示例#1
0
 /**
  * @covers Smrtr\HaltoRouter::match
  * @covers Smrtr\HaltoRouter::compileRoute
  */
 public function testMatchWithHostGroup()
 {
     $this->router->addHostnames(array('www.example.com', 'public.example.com'), 'example website');
     $this->router->map('GET', '/foo/bar', 'Misc@foobar', null, 'example website');
     $this->assertFalse($this->router->match('/foo/bar', 'GET', 'private.example.com'));
     $this->assertSame(array('target' => 'Misc@foobar', 'params' => array(), 'name' => null), $this->router->match('/foo/bar', 'GET', 'public.example.com'));
 }