Merge remote-tracking branch 'origin/master' into 230_merge_master

This commit is contained in:
wing328
2017-06-05 23:27:11 +08:00
1289 changed files with 22425 additions and 48047 deletions

View File

@@ -0,0 +1,34 @@
<?php
namespace Swagger\Client;
use Swagger\Client\Model\FormatTest;
class DateTimeSerializerTest extends \PHPUnit_Framework_TestCase
{
public function testDateTimeSanitazion()
{
$dateTime = new \DateTime('April 30, 1973 17:05 CEST');
$input = new FormatTest([
'date_time' => $dateTime,
]);
$data = ObjectSerializer::sanitizeForSerialization($input);
$this->assertEquals($data->dateTime, '1973-04-30T17:05:00+02:00');
}
public function testDateSanitazion()
{
$dateTime = new \DateTime('April 30, 1973 17:05 CEST');
$input = new FormatTest([
'date' => $dateTime,
]);
$data = ObjectSerializer::sanitizeForSerialization($input);
$this->assertEquals($data->date, '1973-04-30');
}
}

View File

@@ -259,7 +259,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
$response = $this->api->uploadFile($pet_id, 'test meta', __DIR__ . '/../composer.json');
// return ApiResponse
$this->assertInstanceOf(ApiResponse::class, $response);
}
/*
@@ -297,7 +296,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
$new_pet = new Model\Pet;
// the empty object should be serialised to {}
$this->assertSame("{}", "$new_pet");
}
// test inheritance in the model
@@ -391,5 +389,4 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
// 'path' => sys_get_temp_dir() . '/' . $result->getFilename()
// ]);
// }
}

View File

@@ -28,6 +28,5 @@ class UserApiTest extends \PHPUnit_Framework_TestCase
$response,
"response string starts with 'logged in user session'"
);
}
}