From 345375b6b6afbc381c0c2e79763c4845de7e7561 Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Sun, 7 Aug 2016 23:08:55 -0400 Subject: [PATCH] add test --- lib/Cake/Test/Case/Network/CakeRequestTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/Network/CakeRequestTest.php b/lib/Cake/Test/Case/Network/CakeRequestTest.php index 418ef6355..ae4294208 100644 --- a/lib/Cake/Test/Case/Network/CakeRequestTest.php +++ b/lib/Cake/Test/Case/Network/CakeRequestTest.php @@ -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')); } /**