public function testCurlTimeout()
 {
     $options = $this->getOptionsFromGlobals();
     $options['curlopts'] = array(CURLOPT_HEADER => false);
     $options['timeout'] = 0.5;
     $client = new Client(new Curl($options));
     $client->authenticate($options['username'], $options['secret']);
     ob_start();
     // timeout causes a print_r
     $client->getCompanyApi()->getReportSuites();
     ob_clean();
     $fullResponse = $client->getLastResponse();
     $this->assertEquals($fullResponse['errorNumber'], CURLE_OPERATION_TIMEOUTED);
     $this->assertStringStartsWith('Operation timed out after ', $fullResponse['errorMessage']);
 }
 public function testGetEndpoint()
 {
     $client = new Client(new Curl(array('curlopts' => array(CURLOPT_SSLVERSION => 3))));
     $response = $client->getCompanyApi()->getEndpoint('Adobe');
     $this->assertTrue(is_string($response));
 }