public function testGetHost() { UriSchemeFactory::setForcedScheme('https'); UriHostFactory::setForcedHost('foo.bar'); $helper = new Url(); $expected = 'https://foo.bar'; $this->assertSame($expected, $helper->getHost()); }
public function testRetriveIgnoreForcedHost() { UriHostFactory::setForcedHost('foo'); $server = ['SERVER_NAME' => 'bar']; $this->assertSame('bar', UriHostFactory::retrieve($server)); }