Beispiel #1
0
 public function testCancel()
 {
     $returnJson = '{
       "result": "CANCELLED"
     }';
     $transport = new \Echosign\Transports\GuzzleTransport();
     $client = $transport->getClient();
     $stream = Stream::factory($returnJson);
     $mock = new Mock([new Response(200, ['content-type' => 'application/json'], $stream)]);
     $client->getEmitter()->attach($mock);
     $agreement = new Agreements('12335', $transport);
     $info = new \Echosign\RequestBuilders\AgreementStatusUpdateInfo();
     $response = $agreement->cancel('12345', $info);
     $this->assertInstanceOf('Echosign\\Responses\\AgreementStatusUpdateResponse', $response);
     $this->assertEquals('CANCELLED', $response->getResult());
 }