From 7b1cfde8911f5bab3fe95fed6bf1a594842fe1cb Mon Sep 17 00:00:00 2001 From: wing328 Date: Mon, 23 May 2016 15:38:20 +0800 Subject: [PATCH] add enum test in php api client --- .../php/SwaggerClient-php/test/Model/EnumClassTest.php | 4 +++- .../php/SwaggerClient-php/test/Model/EnumTestTest.php | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/samples/client/petstore/php/SwaggerClient-php/test/Model/EnumClassTest.php b/samples/client/petstore/php/SwaggerClient-php/test/Model/EnumClassTest.php index 3433afad97ef..a872ffe6c7e4 100644 --- a/samples/client/petstore/php/SwaggerClient-php/test/Model/EnumClassTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/test/Model/EnumClassTest.php @@ -67,6 +67,8 @@ public static function tearDownAfterClass() */ public function testEnumClass() { - + $this->assertSame(Swagger\Client\Model\EnumClass::ABC, "_abc"); + $this->assertSame(Swagger\Client\Model\EnumClass::EFG, "-efg"); + $this->assertSame(Swagger\Client\Model\EnumClass::XYZ, "(xyz)"); } } diff --git a/samples/client/petstore/php/SwaggerClient-php/test/Model/EnumTestTest.php b/samples/client/petstore/php/SwaggerClient-php/test/Model/EnumTestTest.php index ca6c82e10ac4..2cf9956b8b45 100644 --- a/samples/client/petstore/php/SwaggerClient-php/test/Model/EnumTestTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/test/Model/EnumTestTest.php @@ -67,6 +67,11 @@ public static function tearDownAfterClass() */ public function testEnumTest() { - + $this->assertSame(Swagger\Client\Model\EnumTest::ENUM_STRING_UPPER, "UPPER"); + $this->assertSame(Swagger\Client\Model\EnumTest::ENUM_STRING_LOWER, "lower"); + $this->assertSame(Swagger\Client\Model\EnumTest::ENUM_INTEGER_1, 1); + $this->assertSame(Swagger\Client\Model\EnumTest::ENUM_INTEGER_MINUS_1, -1); + $this->assertSame(Swagger\Client\Model\EnumTest::ENUM_NUMBER_1_DOT_1, 1.1); + $this->assertSame(Swagger\Client\Model\EnumTest::ENUM_NUMBER_MINUS_1_DOT_2, -1.2); } }