Esempio n. 1
0
 public function testErrorDetection()
 {
     $response = Response::fromString($this->getTestOkResponse());
     $this->assertFalse($response->isError());
     $response->setCode(400);
     $this->assertTrue($response->isError());
     $response = new Response();
     $this->assertTrue($response->isError());
     $response = new Response();
     // Curl timeout
     $response->setErrorCode(68);
     $this->assertTrue($response->isError());
 }