Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienbarre committed Aug 8, 2016
1 parent acc32f5 commit 345375b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Cake/Test/Case/Network/CakeRequestTest.php
Expand Up @@ -148,7 +148,7 @@ public function testNoAutoParseConstruction() {

/**
* Test the content type method.
*
*
* @return void
*/
public function testContentType() {
Expand Down Expand Up @@ -1147,11 +1147,13 @@ public function testHeader() {
$_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'));
}

/**
Expand Down

0 comments on commit 345375b

Please sign in to comment.