[php] 2.3 - fix form params json encoding (#5701)

* fixed tests expectations not compatible with phpunit 4

* added test and endpoint definition, updated template

* regenerated sample

* regenerated security sample
This commit is contained in:
baartosz
2017-06-04 18:36:40 +02:00
committed by wing328
parent 08a11c1d75
commit d7202a7c76
14 changed files with 681 additions and 337 deletions

View File

@@ -6,12 +6,13 @@ use GuzzleHttp\Client;
class ExceptionTest extends \PHPUnit_Framework_TestCase
{
/**
* @expectedException \Swagger\Client\ApiException
* @expectedExceptionCode 404
* @expectedExceptionMessage http://petstore.swagger.io/INVALID_URL/store/inventory
*/
public function testNotFound()
{
$this->expectException(ApiException::class);
$this->expectExceptionCode(404);
$this->expectExceptionMessage('http://petstore.swagger.io/INVALID_URL/store/inventory');
$config = new Configuration();
$config->setHost('http://petstore.swagger.io/INVALID_URL');
@@ -22,11 +23,12 @@ class ExceptionTest extends \PHPUnit_Framework_TestCase
$api->getInventory();
}
/**
* @expectedException \Swagger\Client\ApiException
* @expectedExceptionMessage Could not resolve host
*/
public function testWrongHost()
{
$this->expectException(ApiException::class);
$this->expectExceptionMessage('Could not resolve host');
$config = new Configuration();
$config->setHost('http://wrong_host.zxc');