Skip to content

Commit f66a2a0

Browse files
committed
update tests
1 parent f119c2d commit f66a2a0

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

samples/client/petstore/php/OpenAPIClient-php/tests/DebugTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)