Skip to content

Commit

Permalink
Let Slim parse HTTP_CONTENT_TYPE header for PHP built-in server
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Lockhart committed Feb 16, 2014
1 parent b0e2657 commit 71c82b0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/Http/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,19 @@ public function testGetContentTypeWhenNotExists()
$this->assertNull($req->getContentType());
}

/**
* Test get content type with built-in server
*/
public function testGetContentTypeWithBuiltInServer()
{
$env = \Slim\Environment::mock(array(
'slim.input' => '',
'HTTP_CONTENT_TYPE' => 'application/json; charset=ISO-8859-4'
));
$req = new \Slim\Http\Request($env);
$this->assertEquals('application/json; charset=ISO-8859-4', $req->getContentType());
}

/**
* Test get media type
*/
Expand Down

0 comments on commit 71c82b0

Please sign in to comment.