Skip to content

Commit 2dfe43c

Browse files
mejo-backportbot[bot]
authored andcommitted
test(phpunit): fix failing tests
Signed-off-by: Jonas <jonas@freesources.org>
1 parent 43d5ad1 commit 2dfe43c

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

tests/unit/Service/Importer/BoardImportServiceTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
use OCA\Deck\Db\Assignment;
3030
use OCA\Deck\Db\AssignmentMapper;
3131
use OCA\Deck\Db\AttachmentMapper;
32+
use OCA\Deck\Db\Board;
3233
use OCA\Deck\Db\BoardMapper;
3334
use OCA\Deck\Db\Card;
3435
use OCA\Deck\Db\CardMapper;
@@ -156,6 +157,12 @@ public function testImportSuccess() {
156157
$this->userManager->method('userExists')
157158
->willReturn(true);
158159

160+
$board = new Board();
161+
$board->setOwner('admin');
162+
$this->trelloJsonService
163+
->method('getBoard')
164+
->willReturn($board);
165+
159166
$this->boardMapper
160167
->expects($this->once())
161168
->method('insert');

tests/unit/Service/PermissionServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ public function testFindUsers() {
363363
$this->userManager->expects($this->any())
364364
->method('userExists')
365365
->withConsecutive(['user1'], ['user2'])
366-
->willReturnOnConsecutiveCalls($user1, $user2);
366+
->willReturnOnConsecutiveCalls(true, true);
367367

368368
$group = $this->createMock(IGroup::class);
369369
$group->expects($this->once())

0 commit comments

Comments
 (0)