-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move test codes in "test" to "tests" - EnumClassTest - EnumTestTest * Regenerate test/Model/Enum(Class|Test)Test.php
- Loading branch information
Showing
4 changed files
with
117 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
samples/client/petstore/php/SwaggerClient-php/tests/EnumClassTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)'); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
samples/client/petstore/php/SwaggerClient-php/tests/EnumTestTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |