/** * @covers Smrtr\HaltoRouter::generate */ public function testGenerateWithInvalidHostname() { $method = 'GET|POST'; $route = '/[:controller]/[:action]'; $target = function () { }; $name = 'myroute'; $hostGroup = 'example website'; $this->router->addHostname('www.example.com', $hostGroup); $this->router->addHostname('public.example.com', $hostGroup); $this->router->map($method, $route, $target, $name, $hostGroup); $params = array('controller' => 'foo', 'action' => 'bar'); $this->assertSame('https://www.example.com/foo/bar', $this->router->generate($name, $params, 'this hostname is not in the hostgroup', 'https://')); }