@@ -284,7 +284,7 @@ private function setUpDefaultRequestOptions(): void {
284284 $ this ->serverVersion ->method ('getVersionString ' )
285285 ->willReturn ('123.45.6 ' );
286286
287- $ acceptEnc = function_exists ( ' brotli_uncompress ' ) ? 'br, gzip ' : 'gzip ' ;
287+ $ acceptEnc = ((( curl_version ()[ ' features ' ] ?? 0 ) & CURL_VERSION_BROTLI ) === CURL_VERSION_BROTLI ) ? 'br, gzip ' : 'gzip ' ;
288288 $ this ->defaultRequestOptions = [
289289 'verify ' => '/my/path.crt ' ,
290290 'proxy ' => [
@@ -488,7 +488,7 @@ public function testSetDefaultOptionsWithNotInstalled(): void {
488488 $ this ->serverVersion ->method ('getVersionString ' )
489489 ->willReturn ('123.45.6 ' );
490490
491- $ acceptEnc = function_exists ( ' brotli_uncompress ' ) ? 'br, gzip ' : 'gzip ' ;
491+ $ acceptEnc = ((( curl_version ()[ ' features ' ] ?? 0 ) & CURL_VERSION_BROTLI ) === CURL_VERSION_BROTLI ) ? 'br, gzip ' : 'gzip ' ;
492492
493493 $ this ->assertEquals ([
494494 'verify ' => \OC ::$ SERVERROOT . '/resources/config/ca-bundle.crt ' ,
@@ -544,7 +544,7 @@ public function testSetDefaultOptionsWithProxy(): void {
544544 $ this ->serverVersion ->method ('getVersionString ' )
545545 ->willReturn ('123.45.6 ' );
546546
547- $ acceptEnc = function_exists ( ' brotli_uncompress ' ) ? 'br, gzip ' : 'gzip ' ;
547+ $ acceptEnc = ((( curl_version ()[ ' features ' ] ?? 0 ) & CURL_VERSION_BROTLI ) === CURL_VERSION_BROTLI ) ? 'br, gzip ' : 'gzip ' ;
548548
549549 $ this ->assertEquals ([
550550 'verify ' => '/my/path.crt ' ,
@@ -604,7 +604,7 @@ public function testSetDefaultOptionsWithProxyAndExclude(): void {
604604 $ this ->serverVersion ->method ('getVersionString ' )
605605 ->willReturn ('123.45.6 ' );
606606
607- $ acceptEnc = function_exists ( ' brotli_uncompress ' ) ? 'br, gzip ' : 'gzip ' ;
607+ $ acceptEnc = ((( curl_version ()[ ' features ' ] ?? 0 ) & CURL_VERSION_BROTLI ) === CURL_VERSION_BROTLI ) ? 'br, gzip ' : 'gzip ' ;
608608
609609 $ this ->assertEquals ([
610610 'verify ' => '/my/path.crt ' ,
0 commit comments