From bd07425b251a6754188a4ef596424f88c473d783 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 7 Apr 2015 03:59:20 +0800 Subject: [PATCH 1/2] update php test case for PetApi --- .../SwaggerPetstore-php/tests/PetApiTest.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 samples/client/petstore/php/SwaggerPetstore-php/tests/PetApiTest.php diff --git a/samples/client/petstore/php/SwaggerPetstore-php/tests/PetApiTest.php b/samples/client/petstore/php/SwaggerPetstore-php/tests/PetApiTest.php new file mode 100644 index 00000000000..ef495c1229e --- /dev/null +++ b/samples/client/petstore/php/SwaggerPetstore-php/tests/PetApiTest.php @@ -0,0 +1,19 @@ +getPetById($petId); + $this->assertSame($response->id, $petId); + } +} + +?> From 18476114b9c0e96a5f78e1c9cd30e47369c22625 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Tue, 7 Apr 2015 04:02:09 +0800 Subject: [PATCH 2/2] update test case for php, add readme.md --- .../php/SwaggerPetstore-php/README.md | 52 +++++++++++++++++++ .../SwaggerPetstore-php/tests/PetApiTest.php | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 samples/client/petstore/php/SwaggerPetstore-php/README.md diff --git a/samples/client/petstore/php/SwaggerPetstore-php/README.md b/samples/client/petstore/php/SwaggerPetstore-php/README.md new file mode 100644 index 00000000000..6dfd19a292a --- /dev/null +++ b/samples/client/petstore/php/SwaggerPetstore-php/README.md @@ -0,0 +1,52 @@ +## Requirements + +PHP 5.3.3 and later. + +## Composer + +You can install the bindings via [Composer](http://getcomposer.org/). Add this to your `composer.json`: + + { + "repositories": [ + { + "type": "git", + "url": "https://github.com/wing328/SwaggerPetstore-php.git" + } + ], + "require": { + "SwaggerPetstore/SwaggerPetstore-php": "*@dev" + } + } + +Then install via: + + composer install + +To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/00-intro.md#autoloading): + + require_once('vendor/autoload.php'); + +## Manual Installation + +If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the `SwaggerPetstore.php` file. + + require_once('/path/to/SwaggerPetstore-php/SwaggerPetstore.php'); + +## Getting Started + +php test.php + +## Documentation + +TODO + +## Tests + +In order to run tests first install [PHPUnit](http://packagist.org/packages/phpunit/phpunit) via [Composer](http://getcomposer.org/): + + composer update + +To run the test suite: + + ./vendor/bin/phpunit tests + diff --git a/samples/client/petstore/php/SwaggerPetstore-php/tests/PetApiTest.php b/samples/client/petstore/php/SwaggerPetstore-php/tests/PetApiTest.php index ef495c1229e..77413fd30d8 100644 --- a/samples/client/petstore/php/SwaggerPetstore-php/tests/PetApiTest.php +++ b/samples/client/petstore/php/SwaggerPetstore-php/tests/PetApiTest.php @@ -1,6 +1,6 @@