/** * 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 content type */ public function testGetContentTypeWhenNotExists() { $env = \Slim\Environment::mock(); $req = new \Slim\Http\Request($env); $this->assertNull($req->getContentType()); }