File tree Expand file tree Collapse file tree
samples/client/petstore/php/OpenAPIClient-php/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,15 +11,16 @@ public static function setUpBeforeClass(): void
1111 parent ::setUpBeforeClass ();
1212 $ newPet = new Model \Pet ;
1313 $ newPet ->setId (1 );
14- $ newPet ->setName ("PHP Unit Test " );
15- (new Api \PetApi ())->addPetWithHttpInfo ($ newPet );
14+ $ newPet ->setName ("PHP Unit Test " );
15+ $ config = (new Configuration ())->setHost ('http://localhost/v2 ' );
16+ (new Api \PetApi (null , $ config ))->addPetWithHttpInfo ($ newPet );
1617 }
1718
1819 public function testEnableDebugOutput ()
1920 {
2021 $ this ->expectOutputRegex ('#GET /v2/pet/1 HTTP/1.1# ' );
2122
22- $ config = new Configuration ();
23+ $ config = ( new Configuration ())-> setHost ( ' http://localhost/v2 ' );
2324 $ config ->setDebug (true );
2425 $ api = new Api \PetApi (null , $ config );
2526 $ api ->getPetById (1 );
@@ -29,7 +30,7 @@ public function testEnableDebugOutputAsync()
2930 {
3031 $ this ->expectOutputRegex ('#GET /v2/pet/1 HTTP/1.1# ' );
3132
32- $ config = new Configuration ();
33+ $ config = ( new Configuration ())-> setHost ( ' http://localhost/v2 ' );
3334 $ config ->setDebug (true );
3435 $ api = new Api \PetApi (null , $ config );
3536 $ promise = $ api ->getPetByIdAsync (1 );
You can’t perform that action at this time.
0 commit comments