| @@ 26-39 (lines=14) @@ | ||
| 23 | /** |
|
| 24 | * @covers \eZ\Publish\API\Repository\NotificationService::loadNotifications() |
|
| 25 | */ |
|
| 26 | public function testLoadNotifications() |
|
| 27 | { |
|
| 28 | $repository = $this->getRepository(); |
|
| 29 | ||
| 30 | /* BEGIN: Use Case */ |
|
| 31 | $notificationService = $repository->getNotificationService(); |
|
| 32 | $notificationList = $notificationService->loadNotifications(0, 25); |
|
| 33 | /* END: Use Case */ |
|
| 34 | ||
| 35 | $this->assertInstanceOf(NotificationList::class, $notificationList); |
|
| 36 | $this->assertInternalType('array', $notificationList->items); |
|
| 37 | $this->assertInternalType('int', $notificationList->totalCount); |
|
| 38 | $this->assertEquals(5, $notificationList->totalCount); |
|
| 39 | } |
|
| 40 | ||
| 41 | /** |
|
| 42 | * @covers \eZ\Publish\API\Repository\NotificationService::getNotification() |
|
| @@ 25-38 (lines=14) @@ | ||
| 22 | /** |
|
| 23 | * @covers \eZ\Publish\API\Repository\UserPreferenceService::loadUserPreferences() |
|
| 24 | */ |
|
| 25 | public function testLoadUserPreferences() |
|
| 26 | { |
|
| 27 | $repository = $this->getRepository(); |
|
| 28 | ||
| 29 | /* BEGIN: Use Case */ |
|
| 30 | $userPreferenceService = $repository->getUserPreferenceService(); |
|
| 31 | $userPreferenceList = $userPreferenceService->loadUserPreferences(0, 25); |
|
| 32 | /* END: Use Case */ |
|
| 33 | ||
| 34 | $this->assertInstanceOf(UserPreferenceList::class, $userPreferenceList); |
|
| 35 | $this->assertInternalType('array', $userPreferenceList->items); |
|
| 36 | $this->assertInternalType('int', $userPreferenceList->totalCount); |
|
| 37 | $this->assertEquals(5, $userPreferenceList->totalCount); |
|
| 38 | } |
|
| 39 | ||
| 40 | /** |
|
| 41 | * @covers \eZ\Publish\API\Repository\UserPreferenceService::getUserPreference() |
|