This commit is contained in:
Sebastien Barre 2016-08-07 23:08:55 -04:00
parent acc32f5c58
commit 345375b6b6

View file

@ -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'));
}
/**