[PHP] Cleanup EnumTest (#7282)

* Move test codes in "test" to "tests"

- EnumClassTest
- EnumTestTest

* Regenerate test/Model/Enum(Class|Test)Test.php
This commit is contained in:
Akihito Nakano
2018-01-07 12:42:44 +09:00
committed by William Cheng
parent 9b5bba0193
commit 50d217894c
4 changed files with 117 additions and 49 deletions

View File

@@ -6,60 +6,68 @@
*
* @category Class
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
* Swagger Petstore
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 2.3.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace Swagger\Client\Model;
namespace Swagger\Client;
/**
* EnumClassTest Class Doc Comment
*
* @category Class
* @description EnumClass
* @category Class */
// * @description EnumClass
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class EnumClassTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
* 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()
{
}
/**
@@ -67,8 +75,5 @@ class EnumClassTest extends \PHPUnit_Framework_TestCase
*/
public function testEnumClass()
{
$this->assertSame(EnumClass::ABC, "_abc");
$this->assertSame(EnumClass::EFG, "-efg");
$this->assertSame(EnumClass::XYZ, "(xyz)");
}
}

View File

@@ -6,60 +6,68 @@
*
* @category Class
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* Copyright 2016 SmartBear Software
* Swagger Petstore
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 2.3.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Please update the test case below to test the model.
*/
namespace Swagger\Client\Model;
namespace Swagger\Client;
/**
* EnumTestTest Class Doc Comment
*
* @category Class
* @description EnumTest
* @category Class */
// * @description EnumTest
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class EnumTestTest extends \PHPUnit_Framework_TestCase
{
/**
* Setup before running each test case
* 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()
{
}
/**
@@ -67,11 +75,33 @@ class EnumTestTest extends \PHPUnit_Framework_TestCase
*/
public function testEnumTest()
{
$this->assertSame(EnumTest::ENUM_STRING_UPPER, "UPPER");
$this->assertSame(EnumTest::ENUM_STRING_LOWER, "lower");
$this->assertSame(EnumTest::ENUM_INTEGER_1, 1);
$this->assertSame(EnumTest::ENUM_INTEGER_MINUS_1, -1);
$this->assertSame(EnumTest::ENUM_NUMBER_1_DOT_1, 1.1);
$this->assertSame(EnumTest::ENUM_NUMBER_MINUS_1_DOT_2, -1.2);
}
/**
* Test attribute "enum_string"
*/
public function testPropertyEnumString()
{
}
/**
* Test attribute "enum_integer"
*/
public function testPropertyEnumInteger()
{
}
/**
* Test attribute "enum_number"
*/
public function testPropertyEnumNumber()
{
}
/**
* Test attribute "outer_enum"
*/
public function testPropertyOuterEnum()
{
}
}

View File

@@ -0,0 +1,15 @@
<?php
namespace Swagger\Client;
use Swagger\Client\Model\EnumClass;
class EnumClassTest extends \PHPUnit_Framework_TestCase
{
public function testPossibleValues()
{
$this->assertSame(EnumClass::ABC, '_abc');
$this->assertSame(EnumClass::EFG, '-efg');
$this->assertSame(EnumClass::XYZ, '(xyz)');
}
}

View File

@@ -0,0 +1,18 @@
<?php
namespace Swagger\Client;
use Swagger\Client\Model\EnumTest;
class EnumTestTest extends \PHPUnit_Framework_TestCase
{
public function testPossibleValues()
{
$this->assertSame(EnumTest::ENUM_STRING_UPPER, "UPPER");
$this->assertSame(EnumTest::ENUM_STRING_LOWER, "lower");
$this->assertSame(EnumTest::ENUM_INTEGER_1, 1);
$this->assertSame(EnumTest::ENUM_INTEGER_MINUS_1, -1);
$this->assertSame(EnumTest::ENUM_NUMBER_1_DOT_1, 1.1);
$this->assertSame(EnumTest::ENUM_NUMBER_MINUS_1_DOT_2, -1.2);
}
}