Skip to content

Commit d695fd1

Browse files
authored
Merge pull request #155 from maxmind/greg/fix-test-on-macos
Fix test on macOS
2 parents a14bed0 + c97890c commit d695fd1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/GeoIp2/Test/WebService/ClientTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,12 @@ private function makeRequest(
503503
'Accept: application/json',
504504
];
505505

506-
$caBundle = CaBundle::getSystemCaRootBundlePath();
506+
$curlVersion = curl_version();
507+
508+
// On macOS, when the SSL version is "SecureTransport", the system's
509+
// keychain will be used.
510+
$caBundle = $curlVersion['ssl_version'] === 'SecureTransport' ?
511+
null : CaBundle::getSystemCaRootBundlePath();
507512

508513
$curlVersion = curl_version();
509514
$factory->expects($this->exactly($callsToRequest))

0 commit comments

Comments
 (0)