Example #1
0
 /**
  * Tests typed array response
  * @depends testClientConstruct
  */
 public function testFindPetsByStatus(Client $client)
 {
     $pets = $client->findPetsByStatus(array('status' => 'sold'));
     // listing should be validated as Pet_array model, except it doesn't work so disabled.
     // $this->assertInstanceOf('\Guzzle\Service\Resource\Model', $pets );
     // var_dump( $pets->toArray() );
     $this->assertInternalType('array', $pets);
     $this->assertArrayHasKey('id', $pets[0]);
     return (int) $pets[0]['id'];
 }