forked from loafle/openapi-generator-original
Update PHP client default value (#417)
* update php default value * update php samples with oas3
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace OpenAPI\Client;
|
||||
|
||||
use OpenAPI\Client\Api\UserApi;
|
||||
|
||||
class UserApiTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/** @var UserApi*/
|
||||
private $api;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->api = new Api\UserApi();
|
||||
}
|
||||
|
||||
// test login use
|
||||
public function testLoginUser()
|
||||
{
|
||||
// initialize the API client
|
||||
// login
|
||||
$response = $this->api->loginUser('xxxxx', 'yyyyyyyy');
|
||||
|
||||
$this->assertInternalType('string', $response);
|
||||
$this->assertRegExp(
|
||||
'/^logged in user session/',
|
||||
$response,
|
||||
"response string starts with 'logged in user session'"
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user