Skip to content

Commit

Permalink
travis: fixed tests - xdebug headers for PHP 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Mar 14, 2015
1 parent 4e376da commit 4688393
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/Munee/Cases/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function testNonCachedResponse()

$this->assertSame($checkHeaders['Cache-Control'], $setHeaders['Cache-Control']);
unset($setHeaders['Cache-Control']);
$this->assertSame($checkHeaders['Content-Type'], $setHeaders['Content-Type']);
$this->assertContains($checkHeaders['Content-Type'], $setHeaders['Content-Type']);
unset($setHeaders['Content-Type']);
$this->assertSame($checkHeaders['Last-Modified'], $setHeaders['Last-Modified']);
unset($setHeaders['Last-Modified']);
Expand Down Expand Up @@ -127,7 +127,7 @@ public function testExpiredRequestResponse()

$this->assertSame($checkHeaders['Cache-Control'], $setHeaders['Cache-Control']);
unset($setHeaders['Cache-Control']);
$this->assertSame($checkHeaders['Content-Type'], $setHeaders['Content-Type']);
$this->assertContains($checkHeaders['Content-Type'], $setHeaders['Content-Type']);
unset($setHeaders['Content-Type']);
$this->assertSame($checkHeaders['Last-Modified'], $setHeaders['Last-Modified']);
unset($setHeaders['Last-Modified']);
Expand Down Expand Up @@ -166,6 +166,10 @@ protected function getHeaders()
foreach ($rawHeaders as $header) {
$headerParts = explode(':', $header, 2);
if (2 == count($headerParts)) {
if ($headerParts[0] === 'Content-type') {
// xdebug incompatible naming
$headerParts[0] = 'Content-Type';
}
$ret[$headerParts[0]] = trim($headerParts[1]);
} elseif (isset($ret[$headerParts[0]])) {
// If a header param is empty, make sure others with the same name are not set as well
Expand Down

0 comments on commit 4688393

Please sign in to comment.