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