Skip to content

Commit c60e325

Browse files
committed
refactor: Port External\Manager to the query builder
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
1 parent f16958f commit c60e325

7 files changed

Lines changed: 130 additions & 240 deletions

File tree

apps/dav/tests/unit/BackgroundJob/CleanupInvitationTokenJobTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function testRun(): void {
3939

4040
$queryBuilder = $this->createMock(IQueryBuilder::class);
4141
$expr = $this->createMock(IExpressionBuilder::class);
42-
$stmt = $this->createMock(\Doctrine\DBAL\Driver\Statement::class);
4342

4443
$this->dbConnection->expects($this->once())
4544
->method('getQueryBuilder')
@@ -72,9 +71,9 @@ public function testRun(): void {
7271
->with($function)
7372
->willReturn($queryBuilder);
7473
$queryBuilder->expects($this->once())
75-
->method('execute')
74+
->method('executeStatement')
7675
->with()
77-
->willReturn($stmt);
76+
->willReturn(1);
7877

7978
$this->backgroundJob->run([]);
8079
}

apps/dav/tests/unit/Migration/RefreshWebcalJobRegistrarTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function testRun(): void {
5454
->with('calendarsubscriptions')
5555
->willReturn($queryBuilder);
5656
$queryBuilder->expects($this->once())
57-
->method('execute')
57+
->method('executeQuery')
5858
->willReturn($statement);
5959

6060
$statement->expects($this->exactly(4))

apps/dav/tests/unit/Migration/RemoveDeletedUsersCalendarSubscriptionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function testRun(array $subscriptions, array $userExists, int $deletions)
7272

7373
$result = $this->createMock(IResult::class);
7474

75-
$qb->method('execute')
75+
$qb->method('executeQuery')
7676
->willReturn($result);
7777

7878
$result->expects($this->once())

0 commit comments

Comments
 (0)