diff options
author | Anna Larch <anna@nextcloud.com> | 2024-06-10 15:06:21 +0200 |
---|---|---|
committer | Anna <anna@nextcloud.com> | 2024-06-11 11:58:11 +0200 |
commit | 2b66a8b6f284fc347517f5c2982d6602bc6cf561 (patch) | |
tree | 1876c59501560bba6229baeba106c8c660f5d1f5 /apps | |
parent | 3024d71f1b2a0e63fbd7a2a91db6fcbbfa1e39dd (diff) | |
download | nextcloud-server-2b66a8b6f284fc347517f5c2982d6602bc6cf561.tar.gz nextcloud-server-2b66a8b6f284fc347517f5c2982d6602bc6cf561.zip |
fix: failing tests for setup check
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings/tests/Controller/CheckSetupControllerTest.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php index 67fd97aaeaa..7459c4fb7fd 100644 --- a/apps/settings/tests/Controller/CheckSetupControllerTest.php +++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php @@ -47,7 +47,10 @@ use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataDisplayResponse; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\RedirectResponse; +use OCP\DB\IResult; +use OCP\DB\QueryBuilder\IFunctionBuilder; use OCP\DB\QueryBuilder\IQueryBuilder; +use OCP\DB\QueryBuilder\IQueryFunction; use OCP\EventDispatcher\IEventDispatcher; use OCP\Http\Client\IClientService; use OCP\IConfig; @@ -612,8 +615,13 @@ class CheckSetupControllerTest extends TestCase { $this->connection->method('getDatabasePlatform') ->willReturn($sqlitePlatform); $queryBuilder = $this->getMockBuilder(IQueryBuilder::class)->getMock(); - $this->connection->method('getQueryBuilder') - ->willReturn($queryBuilder); + $functionBuilder = $this->getMockBuilder(IFunctionBuilder::class)->getMock(); + $this->connection->method('getQueryBuilder')->willReturn($queryBuilder); + $queryBuilder->method('func')->willReturn($functionBuilder); + $queryBuilder->method('select')->willReturn($queryBuilder); + $queryBuilder->method('from')->willReturn($queryBuilder); + $queryBuilder->method('executeQuery')->willReturn($this->getMockBuilder(IResult::class)->getMock()); + $functionBuilder->method('count')->willReturn($this->getMockBuilder(IQueryFunction::class)->getMock()); $expected = new DataResponse( [ |