Merge pull request #605 from lubiana/fix_tests_on_mac

add case for Macos in ResponseTest::testResponseBodyCallbackGzip
pull/607/head
n0nag0n 5 months ago committed by GitHub
commit 111f8db184
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -318,7 +318,16 @@ class ResponseTest extends TestCase
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));
}

Loading…
Cancel
Save