Skip to content

Commit

Permalink
Merge pull request #605 from lubiana/fix_tests_on_mac
Browse files Browse the repository at this point in the history
add case for Macos in ResponseTest::testResponseBodyCallbackGzip
  • Loading branch information
n0nag0n authored Aug 28, 2024
2 parents 63fbf9b + c5caa0d commit 111f8db
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,16 @@ public function testResponseBodyCallbackGzip()
ob_start();
$response->send();
$gzip_body = ob_get_clean();
$expected = PHP_OS === 'WINNT' ? 'H4sIAAAAAAAACitJLS4BAAx+f9gEAAAA' : 'H4sIAAAAAAAAAytJLS4BAAx+f9gEAAAA';
switch (PHP_OS) {
case 'WINNT':
$expected = 'H4sIAAAAAAAACitJLS4BAAx+f9gEAAAA';
break;
case 'Darwin':
$expected = 'H4sIAAAAAAAAEytJLS4BAAx+f9gEAAAA';
break;
default:
$expected = 'H4sIAAAAAAAAAytJLS4BAAx+f9gEAAAA';
}
$this->assertEquals($expected, base64_encode($gzip_body));
$this->assertEquals(strlen(gzencode('test')), strlen($gzip_body));
}
Expand Down

0 comments on commit 111f8db

Please sign in to comment.