forked from loafle/openapi-generator-original
* Fix PHP Symfony OpenAPI 3.0 sample location * Update PHP Symfony OpenAPI 3.0 sample
This commit is contained in:
committed by
William Cheng
parent
581131e0fe
commit
ed82aaae97
@@ -0,0 +1,217 @@
|
||||
<?php
|
||||
/**
|
||||
* PetApiInterfaceTest
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Api
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Please update the test case below to test the endpoint.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Tests\Api;
|
||||
|
||||
use OpenAPI\Server\Configuration;
|
||||
use OpenAPI\Server\ApiClient;
|
||||
use OpenAPI\Server\ApiException;
|
||||
use OpenAPI\Server\ObjectSerializer;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
/**
|
||||
* PetApiInterfaceTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Api
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
class PetApiInterfaceTest extends WebTestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test cases
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for addPet
|
||||
*
|
||||
* Add a new pet to the store.
|
||||
*
|
||||
*/
|
||||
public function testAddPet()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/pet';
|
||||
|
||||
$crawler = $client->request('POST', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for deletePet
|
||||
*
|
||||
* Deletes a pet.
|
||||
*
|
||||
*/
|
||||
public function testDeletePet()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/pet/{petId}';
|
||||
$pattern = '{petId}';
|
||||
$data = $this->genTestData('\d+');
|
||||
$path = str_replace($pattern, $data, $path);
|
||||
|
||||
$crawler = $client->request('DELETE', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for findPetsByStatus
|
||||
*
|
||||
* Finds Pets by status.
|
||||
*
|
||||
*/
|
||||
public function testFindPetsByStatus()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/pet/findByStatus';
|
||||
|
||||
$crawler = $client->request('GET', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for findPetsByTags
|
||||
*
|
||||
* Finds Pets by tags.
|
||||
*
|
||||
*/
|
||||
public function testFindPetsByTags()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/pet/findByTags';
|
||||
|
||||
$crawler = $client->request('GET', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for getPetById
|
||||
*
|
||||
* Find pet by ID.
|
||||
*
|
||||
*/
|
||||
public function testGetPetById()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/pet/{petId}';
|
||||
$pattern = '{petId}';
|
||||
$data = $this->genTestData('\d+');
|
||||
$path = str_replace($pattern, $data, $path);
|
||||
|
||||
$crawler = $client->request('GET', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for updatePet
|
||||
*
|
||||
* Update an existing pet.
|
||||
*
|
||||
*/
|
||||
public function testUpdatePet()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/pet';
|
||||
|
||||
$crawler = $client->request('PUT', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for updatePetWithForm
|
||||
*
|
||||
* Updates a pet in the store with form data.
|
||||
*
|
||||
*/
|
||||
public function testUpdatePetWithForm()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/pet/{petId}';
|
||||
$pattern = '{petId}';
|
||||
$data = $this->genTestData('\d+');
|
||||
$path = str_replace($pattern, $data, $path);
|
||||
|
||||
$crawler = $client->request('POST', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for uploadFile
|
||||
*
|
||||
* uploads an image.
|
||||
*
|
||||
*/
|
||||
public function testUploadFile()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/pet/{petId}/uploadImage';
|
||||
$pattern = '{petId}';
|
||||
$data = $this->genTestData('\d+');
|
||||
$path = str_replace($pattern, $data, $path);
|
||||
|
||||
$crawler = $client->request('POST', $path);
|
||||
}
|
||||
|
||||
protected function genTestData($regexp)
|
||||
{
|
||||
$grammar = new \Hoa\File\Read('hoa://Library/Regex/Grammar.pp');
|
||||
$compiler = \Hoa\Compiler\Llk\Llk::load($grammar);
|
||||
$ast = $compiler->parse($regexp);
|
||||
$generator = new \Hoa\Regex\Visitor\Isotropic(new \Hoa\Math\Sampler\Random());
|
||||
|
||||
return $generator->visit($ast);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
/**
|
||||
* StoreApiInterfaceTest
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Api
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Please update the test case below to test the endpoint.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Tests\Api;
|
||||
|
||||
use OpenAPI\Server\Configuration;
|
||||
use OpenAPI\Server\ApiClient;
|
||||
use OpenAPI\Server\ApiException;
|
||||
use OpenAPI\Server\ObjectSerializer;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
/**
|
||||
* StoreApiInterfaceTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Api
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
class StoreApiInterfaceTest extends WebTestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test cases
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for deleteOrder
|
||||
*
|
||||
* Delete purchase order by ID.
|
||||
*
|
||||
*/
|
||||
public function testDeleteOrder()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/store/order/{orderId}';
|
||||
$pattern = '{orderId}';
|
||||
$data = $this->genTestData('[a-z0-9]+');
|
||||
$path = str_replace($pattern, $data, $path);
|
||||
|
||||
$crawler = $client->request('DELETE', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for getInventory
|
||||
*
|
||||
* Returns pet inventories by status.
|
||||
*
|
||||
*/
|
||||
public function testGetInventory()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/store/inventory';
|
||||
|
||||
$crawler = $client->request('GET', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for getOrderById
|
||||
*
|
||||
* Find purchase order by ID.
|
||||
*
|
||||
*/
|
||||
public function testGetOrderById()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/store/order/{orderId}';
|
||||
$pattern = '{orderId}';
|
||||
$data = $this->genTestData('\d+');
|
||||
$path = str_replace($pattern, $data, $path);
|
||||
|
||||
$crawler = $client->request('GET', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for placeOrder
|
||||
*
|
||||
* Place an order for a pet.
|
||||
*
|
||||
*/
|
||||
public function testPlaceOrder()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/store/order';
|
||||
|
||||
$crawler = $client->request('POST', $path);
|
||||
}
|
||||
|
||||
protected function genTestData($regexp)
|
||||
{
|
||||
$grammar = new \Hoa\File\Read('hoa://Library/Regex/Grammar.pp');
|
||||
$compiler = \Hoa\Compiler\Llk\Llk::load($grammar);
|
||||
$ast = $compiler->parse($regexp);
|
||||
$generator = new \Hoa\Regex\Visitor\Isotropic(new \Hoa\Math\Sampler\Random());
|
||||
|
||||
return $generator->visit($ast);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
<?php
|
||||
/**
|
||||
* UserApiInterfaceTest
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Api
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Please update the test case below to test the endpoint.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Tests\Api;
|
||||
|
||||
use OpenAPI\Server\Configuration;
|
||||
use OpenAPI\Server\ApiClient;
|
||||
use OpenAPI\Server\ApiException;
|
||||
use OpenAPI\Server\ObjectSerializer;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
/**
|
||||
* UserApiInterfaceTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Api
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
class UserApiInterfaceTest extends WebTestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test cases
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for createUser
|
||||
*
|
||||
* Create user.
|
||||
*
|
||||
*/
|
||||
public function testCreateUser()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/user';
|
||||
|
||||
$crawler = $client->request('POST', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for createUsersWithArrayInput
|
||||
*
|
||||
* Creates list of users with given input array.
|
||||
*
|
||||
*/
|
||||
public function testCreateUsersWithArrayInput()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/user/createWithArray';
|
||||
|
||||
$crawler = $client->request('POST', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for createUsersWithListInput
|
||||
*
|
||||
* Creates list of users with given input array.
|
||||
*
|
||||
*/
|
||||
public function testCreateUsersWithListInput()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/user/createWithList';
|
||||
|
||||
$crawler = $client->request('POST', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for deleteUser
|
||||
*
|
||||
* Delete user.
|
||||
*
|
||||
*/
|
||||
public function testDeleteUser()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/user/{username}';
|
||||
$pattern = '{username}';
|
||||
$data = $this->genTestData('[a-z0-9]+');
|
||||
$path = str_replace($pattern, $data, $path);
|
||||
|
||||
$crawler = $client->request('DELETE', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for getUserByName
|
||||
*
|
||||
* Get user by user name.
|
||||
*
|
||||
*/
|
||||
public function testGetUserByName()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/user/{username}';
|
||||
$pattern = '{username}';
|
||||
$data = $this->genTestData('[a-z0-9]+');
|
||||
$path = str_replace($pattern, $data, $path);
|
||||
|
||||
$crawler = $client->request('GET', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for loginUser
|
||||
*
|
||||
* Logs user into the system.
|
||||
*
|
||||
*/
|
||||
public function testLoginUser()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/user/login';
|
||||
|
||||
$crawler = $client->request('GET', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for logoutUser
|
||||
*
|
||||
* Logs out current logged in user session.
|
||||
*
|
||||
*/
|
||||
public function testLogoutUser()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/user/logout';
|
||||
|
||||
$crawler = $client->request('GET', $path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for updateUser
|
||||
*
|
||||
* Updated user.
|
||||
*
|
||||
*/
|
||||
public function testUpdateUser()
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$path = '/user/{username}';
|
||||
$pattern = '{username}';
|
||||
$data = $this->genTestData('[a-z0-9]+');
|
||||
$path = str_replace($pattern, $data, $path);
|
||||
|
||||
$crawler = $client->request('PUT', $path);
|
||||
}
|
||||
|
||||
protected function genTestData($regexp)
|
||||
{
|
||||
$grammar = new \Hoa\File\Read('hoa://Library/Regex/Grammar.pp');
|
||||
$compiler = \Hoa\Compiler\Llk\Llk::load($grammar);
|
||||
$ast = $compiler->parse($regexp);
|
||||
$generator = new \Hoa\Regex\Visitor\Isotropic(new \Hoa\Math\Sampler\Random());
|
||||
|
||||
return $generator->visit($ast);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
|
||||
class AppKernel extends Kernel
|
||||
{
|
||||
public function registerBundles()
|
||||
{
|
||||
$bundles = array(
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle()
|
||||
);
|
||||
|
||||
return $bundles;
|
||||
}
|
||||
|
||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||
{
|
||||
$loader->load(__DIR__.'/test_config.yml');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
/**
|
||||
* ApiResponseTest
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Model;
|
||||
|
||||
/**
|
||||
* ApiResponseTest Class Doc Comment
|
||||
*
|
||||
* @category Class */
|
||||
// * @description Describes the result of uploading an image resource
|
||||
/**
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
class ApiResponseTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "ApiResponse"
|
||||
*/
|
||||
public function testApiResponse()
|
||||
{
|
||||
$testApiResponse = new ApiResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "code"
|
||||
*/
|
||||
public function testPropertyCode()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "type"
|
||||
*/
|
||||
public function testPropertyType()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "message"
|
||||
*/
|
||||
public function testPropertyMessage()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* CategoryTest
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Model;
|
||||
|
||||
/**
|
||||
* CategoryTest Class Doc Comment
|
||||
*
|
||||
* @category Class */
|
||||
// * @description A category for a pet
|
||||
/**
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
class CategoryTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "Category"
|
||||
*/
|
||||
public function testCategory()
|
||||
{
|
||||
$testCategory = new Category();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "id"
|
||||
*/
|
||||
public function testPropertyId()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "name"
|
||||
*/
|
||||
public function testPropertyName()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* InlineObject1Test
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Model;
|
||||
|
||||
/**
|
||||
* InlineObject1Test Class Doc Comment
|
||||
*
|
||||
* @category Class */
|
||||
// * @description InlineObject1
|
||||
/**
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
class InlineObject1Test extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "InlineObject1"
|
||||
*/
|
||||
public function testInlineObject1()
|
||||
{
|
||||
$testInlineObject1 = new InlineObject1();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "additionalMetadata"
|
||||
*/
|
||||
public function testPropertyAdditionalMetadata()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "file"
|
||||
*/
|
||||
public function testPropertyFile()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* InlineObjectTest
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Model;
|
||||
|
||||
/**
|
||||
* InlineObjectTest Class Doc Comment
|
||||
*
|
||||
* @category Class */
|
||||
// * @description InlineObject
|
||||
/**
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
class InlineObjectTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "InlineObject"
|
||||
*/
|
||||
public function testInlineObject()
|
||||
{
|
||||
$testInlineObject = new InlineObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "name"
|
||||
*/
|
||||
public function testPropertyName()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "status"
|
||||
*/
|
||||
public function testPropertyStatus()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
/**
|
||||
* OrderTest
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Model;
|
||||
|
||||
/**
|
||||
* OrderTest Class Doc Comment
|
||||
*
|
||||
* @category Class */
|
||||
// * @description An order for a pets from the pet store
|
||||
/**
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
class OrderTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "Order"
|
||||
*/
|
||||
public function testOrder()
|
||||
{
|
||||
$testOrder = new Order();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "id"
|
||||
*/
|
||||
public function testPropertyId()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "petId"
|
||||
*/
|
||||
public function testPropertyPetId()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "quantity"
|
||||
*/
|
||||
public function testPropertyQuantity()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "shipDate"
|
||||
*/
|
||||
public function testPropertyShipDate()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "status"
|
||||
*/
|
||||
public function testPropertyStatus()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "complete"
|
||||
*/
|
||||
public function testPropertyComplete()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
/**
|
||||
* PetTest
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Model;
|
||||
|
||||
/**
|
||||
* PetTest Class Doc Comment
|
||||
*
|
||||
* @category Class */
|
||||
// * @description A pet for sale in the pet store
|
||||
/**
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
class PetTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "Pet"
|
||||
*/
|
||||
public function testPet()
|
||||
{
|
||||
$testPet = new Pet();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "id"
|
||||
*/
|
||||
public function testPropertyId()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "category"
|
||||
*/
|
||||
public function testPropertyCategory()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "name"
|
||||
*/
|
||||
public function testPropertyName()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "photoUrls"
|
||||
*/
|
||||
public function testPropertyPhotoUrls()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "tags"
|
||||
*/
|
||||
public function testPropertyTags()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "status"
|
||||
*/
|
||||
public function testPropertyStatus()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
/**
|
||||
* TagTest
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Model;
|
||||
|
||||
/**
|
||||
* TagTest Class Doc Comment
|
||||
*
|
||||
* @category Class */
|
||||
// * @description A tag for a pet
|
||||
/**
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
class TagTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "Tag"
|
||||
*/
|
||||
public function testTag()
|
||||
{
|
||||
$testTag = new Tag();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "id"
|
||||
*/
|
||||
public function testPropertyId()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "name"
|
||||
*/
|
||||
public function testPropertyName()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
/**
|
||||
* UserTest
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the openapi generator program.
|
||||
* https://github.com/openapitools/openapi-generator
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Server\Model;
|
||||
|
||||
/**
|
||||
* UserTest Class Doc Comment
|
||||
*
|
||||
* @category Class */
|
||||
// * @description A User who is purchasing from the pet store
|
||||
/**
|
||||
* @package OpenAPI\Server\Tests\Model
|
||||
* @author openapi-generator contributors
|
||||
* @link https://github.com/openapitools/openapi-generator
|
||||
*/
|
||||
class UserTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "User"
|
||||
*/
|
||||
public function testUser()
|
||||
{
|
||||
$testUser = new User();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "id"
|
||||
*/
|
||||
public function testPropertyId()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "username"
|
||||
*/
|
||||
public function testPropertyUsername()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "firstName"
|
||||
*/
|
||||
public function testPropertyFirstName()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "lastName"
|
||||
*/
|
||||
public function testPropertyLastName()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "email"
|
||||
*/
|
||||
public function testPropertyEmail()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "password"
|
||||
*/
|
||||
public function testPropertyPassword()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "phone"
|
||||
*/
|
||||
public function testPropertyPhone()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "userStatus"
|
||||
*/
|
||||
public function testPropertyUserStatus()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
imports:
|
||||
- { resource: "../Resources/config/services.yml" }
|
||||
|
||||
framework:
|
||||
secret: "testsecret"
|
||||
test: ~
|
||||
router:
|
||||
resource: "%kernel.root_dir%/../Resources/config/routing.yml"
|
||||
Reference in New Issue
Block a user