forked from loafle/openapi-generator-original
Update PHP client default value (#417)
* update php default value * update php samples with oas3
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
namespace OpenAPI\Client;
|
||||
|
||||
class DebugTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testEnableDebugOutput()
|
||||
{
|
||||
$this->expectOutputRegex('#GET /v2/pet/1 HTTP/1.1#');
|
||||
|
||||
$config = new Configuration();
|
||||
$config->setDebug(true);
|
||||
$api = new Api\PetApi(null, $config);
|
||||
$api->getPetById(1);
|
||||
}
|
||||
|
||||
public function testEnableDebugOutputAsync()
|
||||
{
|
||||
$this->expectOutputRegex('#GET /v2/pet/1 HTTP/1.1#');
|
||||
|
||||
$config = new Configuration();
|
||||
$config->setDebug(true);
|
||||
$api = new Api\PetApi(null, $config);
|
||||
$promise = $api->getPetByIdAsync(1);
|
||||
$promise->wait();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user