示例#1
0
 public function testGetDeed()
 {
     $json = file_get_contents(__DIR__ . '/result/deed.json');
     $body = \GuzzleHttp\Stream\Stream::factory($json);
     $mock = new \GuzzleHttp\Subscriber\Mock([new \GuzzleHttp\Message\Response(200, [], $body)]);
     $client = new \Picturae\Genealogy\Client($this->key);
     $client->getClient()->getEmitter()->attach($mock);
     $id = '01792869-7556-f1ad-ef04-aacb0be11b49';
     $deed = $client->getDeed($id);
     $this->assertEquals($deed->id, $id);
 }