示例#1
0
 /**
  * Test get host
  */
 public function testGetHostWhenNotExists()
 {
     $env = Slim_Environment::mock(array('SERVER_NAME' => 'slim', 'HOST' => 'slimframework.com'));
     unset($env['HOST']);
     $req = new Slim_Http_Request($env);
     $this->assertEquals('slim', $req->getHost());
     //Uses SERVER_NAME as backup
 }
示例#2
0
 /**
  * Test get host
  */
 public function testGetHostWhenNotExists()
 {
     $env = Slim_Environment::getInstance();
     $req = new Slim_Http_Request($env);
     $this->assertEquals('slim', $req->getHost());
     //Uses SERVER_NAME as backup
 }