Get rid of mockery library. Still have some troubles with functional tests for api

This commit is contained in:
ErickSkrauch
2019-12-14 00:16:05 +03:00
parent d9ef27b745
commit e8b71d33d0
37 changed files with 217 additions and 374 deletions

View File

@ -56,7 +56,7 @@ class OauthClientForm {
public function delete(): bool {
$transaction = Yii::$app->db->beginTransaction();
$client = $this->client;
$client = $this->getClient();
$client->is_deleted = true;
Assert::true($client->save(), 'Cannot update oauth client');
@ -70,7 +70,7 @@ class OauthClientForm {
public function reset(bool $regenerateSecret = false): bool {
$transaction = Yii::$app->db->beginTransaction();
$client = $this->client;
$client = $this->getClient();
if ($regenerateSecret) {
$client->generateSecret();
Assert::true($client->save(), 'Cannot update oauth client');