chore(tests): UT for Config service & repository

Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
Rubén D
2024-01-14 10:42:45 +01:00
parent 28dc47fe58
commit 739f40ba5d
61 changed files with 1304 additions and 690 deletions

View File

@@ -81,7 +81,7 @@ class ClientRepositoryTest extends UnitaryTestCase
}
);
$callbackUpdate = new Callback(
$callbackCreate = new Callback(
static function (QueryData $arg) use ($client) {
$query = $arg->getQuery();
$params = $query->getBindValues();
@@ -99,7 +99,7 @@ class ClientRepositoryTest extends UnitaryTestCase
$this->database
->expects(self::exactly(2))
->method('doQuery')
->with(...self::withConsecutive([$callbackDuplicate], [$callbackUpdate]))
->with(...self::withConsecutive([$callbackDuplicate], [$callbackCreate]))
->willReturn(new QueryResult([]), new QueryResult([1]));
$this->clientRepository->create($client);