forked from loafle/openapi-generator-original
* fix php tests * fix scala tests * update ts angular v6 rest * fix user create test * fix spring cloud test * comment out user delete * fix angular v7 tests * fix user test * fix tests * fix go exp tests * commented out delete user tests * comment out delete user tests in go openapi 3 * fix clojure tests
34 lines
685 B
PHP
34 lines
685 B
PHP
<?php
|
|
|
|
namespace OpenAPI\Client;
|
|
|
|
use OpenAPI\Client\Api\UserApi;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class UserApiTest extends 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'"
|
|
);
|
|
}
|
|
}
|