mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
add test
This commit is contained in:
parent
acc32f5c58
commit
345375b6b6
1 changed files with 3 additions and 1 deletions
|
@ -148,7 +148,7 @@ class CakeRequestTest extends CakeTestCase {
|
|||
|
||||
/**
|
||||
* Test the content type method.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testContentType() {
|
||||
|
@ -1147,11 +1147,13 @@ class CakeRequestTest extends CakeTestCase {
|
|||
$_SERVER['HTTP_X_THING'] = '';
|
||||
$_SERVER['HTTP_HOST'] = 'localhost';
|
||||
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-ca) AppleWebKit/534.8+ (KHTML, like Gecko) Version/5.0 Safari/533.16';
|
||||
$_SERVER['ThatOneHeader'] = 'foobar';
|
||||
$request = new CakeRequest('/', false);
|
||||
|
||||
$this->assertEquals($_SERVER['HTTP_HOST'], $request->header('host'));
|
||||
$this->assertEquals($_SERVER['HTTP_USER_AGENT'], $request->header('User-Agent'));
|
||||
$this->assertSame('', $request->header('X-thing'));
|
||||
$this->assertEquals($_SERVER['ThatOneHeader'], $request->header('ThatOneHeader'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue