Add a Pet before run test cases

This commit is contained in:
akihito.nakano 2018-03-29 21:01:31 +09:00
parent 75e354ed71
commit 4b49b256bb

View File

@ -3,6 +3,16 @@ namespace Swagger\Client;
class DebugTest extends \PHPUnit_Framework_TestCase class DebugTest extends \PHPUnit_Framework_TestCase
{ {
public static function setUpBeforeClass()
{
parent::setUpBeforeClass();
$newPet = new Model\Pet;
$newPet->setId(1);
$newPet->setName("PHP Unit Test");
(new Api\PetApi())->addPetWithHttpInfo($newPet);
}
public function testEnableDebugOutput() public function testEnableDebugOutput()
{ {
$this->expectOutputRegex('#GET /v2/pet/1 HTTP/1.1#'); $this->expectOutputRegex('#GET /v2/pet/1 HTTP/1.1#');