2018-02-28 03:57:35 +05:30
|
|
|
<?php
|
2019-09-18 04:44:05 +05:30
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace api\tests\functional\dev\applications;
|
2018-02-28 03:57:35 +05:30
|
|
|
|
2019-02-21 01:28:52 +05:30
|
|
|
use api\tests\_pages\OauthRoute;
|
|
|
|
use api\tests\FunctionalTester;
|
2018-02-28 03:57:35 +05:30
|
|
|
|
|
|
|
class DeleteClientCest {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var OauthRoute
|
|
|
|
*/
|
|
|
|
private $route;
|
|
|
|
|
|
|
|
public function _before(FunctionalTester $I) {
|
|
|
|
$this->route = new OauthRoute($I);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testDelete(FunctionalTester $I) {
|
|
|
|
$I->amAuthenticated('TwoOauthClients');
|
|
|
|
$this->route->deleteClient('first-test-oauth-client');
|
|
|
|
$I->canSeeResponseCodeIs(200);
|
|
|
|
$I->canSeeResponseIsJson();
|
|
|
|
$I->canSeeResponseContainsJson([
|
|
|
|
'success' => true,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|