William Cheng e5be838fa8
Update PHP client default value (#417)
* update php default value

* update php samples with oas3
2018-05-11 15:28:09 +08:00

27 lines
669 B
PHP

<?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();
}
}