Closed greg0ire closed 8 years ago
@stof I believe the build should pass if you restart it…
Until that PR is merged (has been open since 2016, you can do this - hack but works). Put in a method to retrieve the api and then work with it.
public function getWebApiContext() {
$api = $this->getExternalContext(WebApiContext::class);
$reflection = new ReflectionObject($api);
$reflectionMethod = $reflection->getMethod('getClient');
$reflectionMethod->setAccessible(true);
$client = $reflectionMethod->invoke($api);
$reflection = new ReflectionObject($client);
$reflectionProperty = $reflection->getProperty('config');
$reflectionProperty->setAccessible(true);
$config = $reflectionProperty->getValue($client);
$config['verify'] = false;
$reflectionProperty->setValue($client, $config);
return $api;
}
We are testing, which means we are probably using a self-signed certificate.