Skip to content

Commit 4649216

Browse files
committed
test(phpunit): fix failing tests
test(phpunit): fix failing tests Signed-off-by: Jonas <jonas@freesources.org> [skip ci]
1 parent 29d073a commit 4649216

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

lib/Service/AttachmentService.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public function __construct(
6363
ActivityManager $activityManager,
6464
AttachmentServiceValidator $attachmentServiceValidator,
6565
) {
66+
$this->configService = $configService;
6667
$this->attachmentMapper = $attachmentMapper;
6768
$this->cardMapper = $cardMapper;
6869
$this->permissionService = $permissionService;

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;
@@ -151,6 +152,12 @@ public function testImportSuccess() {
151152
$this->userManager->method('userExists')
152153
->willReturn(true);
153154

155+
$board = new Board();
156+
$board->setOwner('admin');
157+
$this->trelloJsonService
158+
->method('getBoard')
159+
->willReturn($board);
160+
154161
$this->boardMapper
155162
->expects($this->once())
156163
->method('insert');

tests/unit/Service/PermissionServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ public function testFindUsers() {
358358
$this->userManager->expects($this->any())
359359
->method('userExists')
360360
->withConsecutive(['user1'], ['user2'])
361-
->willReturnOnConsecutiveCalls($user1, $user2);
361+
->willReturnOnConsecutiveCalls(true, true);
362362

363363
$group = $this->createMock(IGroup::class);
364364
$group->expects($this->once())

0 commit comments

Comments
 (0)