File tree 1 file changed +4
-2
lines changed
samples/client/petstore/php/SwaggerClient-php/tests 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ public function testUpdatePetWithForm()
206
206
}
207
207
208
208
// test addPet and verify by the "id" and "name" of the response
209
- public function testAddPet ()
209
+ public function testAddPetUsingByteArray ()
210
210
{
211
211
// initialize the API client
212
212
$ config = (new Swagger \Client \Configuration ())->setHost ('http://petstore.swagger.io/v2 ' );
@@ -217,14 +217,16 @@ public function testAddPet()
217
217
$ new_pet ->setName ("PHP Unit Test " );
218
218
$ pet_api = new Swagger \Client \Api \PetAPI ($ api_client );
219
219
// add a new pet (model)
220
- $ add_response = $ pet_api ->addPet ( $ new_pet );
220
+ $ add_response = $ pet_api ->addPetUsingByteArray ( unpack ( ' C* ' , $ new_pet) );
221
221
// return nothing (void)
222
222
$ this ->assertSame ($ add_response , NULL );
223
223
// verify added Pet
224
224
$ response = $ pet_api ->getPetById ($ new_pet_id );
225
225
$ this ->assertSame ($ response ->getId (), $ new_pet_id );
226
226
$ this ->assertSame ($ response ->getName (), 'PHP Unit Test ' );
227
227
}
228
+
229
+
228
230
229
231
// test upload file
230
232
public function testUploadFile ()
You can’t perform that action at this time.
0 commit comments