Skip to content

Commit 59e6529

Browse files
committed
refactor(result): Adapt tests to new result methods
Signed-off-by: Carl Schwan <[email protected]>
1 parent 90f4b98 commit 59e6529

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

apps/dav/tests/unit/Controller/InvitationResponseControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ private function buildQueryExpects(string $token, ?array $return, int $time): vo
422422

423423
$stmt->expects($this->once())
424424
->method('fetchAssociative')
425-
->willReturn($return);
425+
->willReturn($return ?? false);
426426
$stmt->expects($this->once())
427427
->method('closeCursor');
428428

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ public function testRun(): void {
5858
->willReturn($statement);
5959

6060
$statement->expects($this->exactly(4))
61-
->method('fetch')
62-
->with(\PDO::FETCH_ASSOC)
61+
->method('fetchAssociative')
6362
->willReturnOnConsecutiveCalls(
6463
[
6564
'principaluri' => 'foo1',
@@ -73,7 +72,7 @@ public function testRun(): void {
7372
'principaluri' => 'foo3',
7473
'uri' => 'bar3',
7574
],
76-
null
75+
false,
7776
);
7877

7978
$this->jobList->expects($this->exactly(3))

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function testRun(array $subscriptions, array $userExists, int $deletions)
8080
->willReturn(count($subscriptions));
8181

8282
$result
83-
->method('fetch')
83+
->method('fetchAssociative')
8484
->willReturnOnConsecutiveCalls(...$subscriptions);
8585

8686
$qb->method('delete')

0 commit comments

Comments
 (0)