示例#1
0
 /**
  * Test get content charset
  */
 public function testGetContentCharsetWhenNotExists()
 {
     $env = Slim_Environment::mock(array('slim.input' => '', 'CONTENT_TYPE' => 'application/json'));
     $req = new Slim_Http_Request($env);
     $this->assertNull($req->getContentCharset());
 }
示例#2
0
 /**
  * Test get content charset
  */
 public function testGetContentCharsetWhenNotExists()
 {
     Slim_Environment::mock(array('REQUEST_METHOD' => 'PUT', 'REMOTE_ADDR' => '127.0.0.1', 'SCRIPT_NAME' => '/foo/index.php', 'PATH_INFO' => '/bar/xyz', 'QUERY_STRING' => 'one=1&two=2&three=3', 'SERVER_NAME' => 'slim', 'SERVER_PORT' => 80, 'slim.url_scheme' => 'http', 'slim.input' => '', 'slim.errors' => fopen('php://stderr', 'w'), 'CONTENT_TYPE' => 'application/json'));
     $env = Slim_Environment::getInstance();
     $req = new Slim_Http_Request($env);
     $this->assertNull($req->getContentCharset());
 }