Skip to content

Commit 08e8c4e

Browse files
committed
test(phpunit): fix failing tests
Signed-off-by: Jonas <jonas@freesources.org>
1 parent 0dc30ec commit 08e8c4e

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
@@ -30,6 +30,7 @@
3030
use OCA\Deck\Db\Assignment;
3131
use OCA\Deck\Db\AssignmentMapper;
3232
use OCA\Deck\Db\AttachmentMapper;
33+
use OCA\Deck\Db\Board;
3334
use OCA\Deck\Db\BoardMapper;
3435
use OCA\Deck\Db\Card;
3536
use OCA\Deck\Db\CardMapper;
@@ -157,6 +158,12 @@ public function testImportSuccess() {
157158
$this->userManager->method('userExists')
158159
->willReturn(true);
159160

161+
$board = new Board();
162+
$board->setOwner('admin');
163+
$this->trelloJsonService
164+
->method('getBoard')
165+
->willReturn($board);
166+
160167
$this->boardMapper
161168
->expects($this->once())
162169
->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)