mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing test case
This commit is contained in:
parent
0c183b9b8e
commit
849abab6a4
1 changed files with 2 additions and 2 deletions
|
@ -153,11 +153,11 @@ class CakeRequestTest extends CakeTestCase {
|
|||
*/
|
||||
public function testContentType() {
|
||||
$_SERVER['HTTP_CONTENT_TYPE'] = 'application/json';
|
||||
$request = Request::createFromGlobals();
|
||||
$request = new CakeRequest('/', false);
|
||||
$this->assertEquals('application/json', $request->contentType());
|
||||
|
||||
$_SERVER['CONTENT_TYPE'] = 'application/xml';
|
||||
$request = Request::createFromGlobals();
|
||||
$request = new CakeRequest('/', false);
|
||||
$this->assertEquals('application/xml', $request->contentType(), 'prefer non http header.');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue