Esempio n. 1
0
 /**
  * @dataProvider serverHostnameProvider
  * @param array  $server
  * @param string $name
  * @param string $value
  */
 public function testServerHostnameProvider(array $server, $expectedHost, $expectedRequestUri)
 {
     $_SERVER = $server;
     $request = new Request();
     $host = $request->uri()->getHost();
     $this->assertEquals($expectedHost, $host);
     $requestUri = $request->getRequestUri();
     $this->assertEquals($expectedRequestUri, $requestUri);
 }