tests: Adapt tests

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2023-02-15 16:40:46 +01:00
parent c1e29ab8cb
commit 133e3f3140
7 changed files with 44 additions and 26 deletions

View File

@@ -37,6 +37,7 @@ use OCP\IConfig;
use OCP\IGroup;
use OCP\IGroupManager;
use OCP\IUser;
use OCP\IUserManager;
use OCP\Notification\IManager;
use OCP\Notification\INotification;
use PHPUnit\Framework\MockObject\MockObject;
@@ -219,8 +220,9 @@ class NotificationHelperTest extends \Test\TestCase {
'title' => 'MyCardTitle',
'duedate' => '2020-12-24'
]);
$userManager = $this->createMock(IUserManager::class);
$card->setAssignedUsers([
new User($users[0])
new User($users[0]->getUID(), $userManager)
]);
$this->cardMapper->expects($this->once())
->method('findBoardId')
@@ -308,8 +310,9 @@ class NotificationHelperTest extends \Test\TestCase {
'title' => 'MyCardTitle',
'duedate' => '2020-12-24'
]);
$userManager = $this->createMock(IUserManager::class);
$card->setAssignedUsers([
new User($users[0])
new User($users[0]->getUID(), $userManager)
]);
$this->cardMapper->expects($this->once())
->method('findBoardId')