| @@ 74-86 (lines=13) @@ | ||
| 71 | /** |
|
| 72 | * @covers \eZ\Publish\Core\Persistence\Legacy\Notification\Handler::countPendingNotifications |
|
| 73 | */ |
|
| 74 | public function testCountPendingNotifications() |
|
| 75 | { |
|
| 76 | $ownerId = 10; |
|
| 77 | $expectedCount = 12; |
|
| 78 | ||
| 79 | $this->gateway |
|
| 80 | ->expects($this->once()) |
|
| 81 | ->method('countUserPendingNotifications') |
|
| 82 | ->with($ownerId) |
|
| 83 | ->willReturn($expectedCount); |
|
| 84 | ||
| 85 | $this->assertEquals($expectedCount, $this->handler->countPendingNotifications($ownerId)); |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * @covers \eZ\Publish\Core\Persistence\Legacy\Notification\Handler::getNotificationById |
|
| @@ 163-175 (lines=13) @@ | ||
| 160 | /** |
|
| 161 | * @covers \eZ\Publish\Core\Persistence\Legacy\Notification\Handler::countNotifications |
|
| 162 | */ |
|
| 163 | public function testCountNotifications() |
|
| 164 | { |
|
| 165 | $ownerId = 10; |
|
| 166 | $expectedCount = 12; |
|
| 167 | ||
| 168 | $this->gateway |
|
| 169 | ->expects($this->once()) |
|
| 170 | ->method('countUserNotifications') |
|
| 171 | ->with($ownerId) |
|
| 172 | ->willReturn($expectedCount); |
|
| 173 | ||
| 174 | $this->assertEquals($expectedCount, $this->handler->countNotifications($ownerId)); |
|
| 175 | } |
|
| 176 | ||
| 177 | /** |
|
| 178 | * @covers \eZ\Publish\Core\Persistence\Legacy\Notification\Handler::loadUserNotifications |
|
| @@ 76-88 (lines=13) @@ | ||
| 73 | /** |
|
| 74 | * @covers \eZ\Publish\Core\Persistence\Legacy\UserPreference\Handler::countUserPreferences |
|
| 75 | */ |
|
| 76 | public function testCountUserPreferences() |
|
| 77 | { |
|
| 78 | $ownerId = 10; |
|
| 79 | $expectedCount = 12; |
|
| 80 | ||
| 81 | $this->gateway |
|
| 82 | ->expects($this->once()) |
|
| 83 | ->method('countUserPreferences') |
|
| 84 | ->with($ownerId) |
|
| 85 | ->willReturn($expectedCount); |
|
| 86 | ||
| 87 | $this->assertEquals($expectedCount, $this->handler->countUserPreferences($ownerId)); |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|
| 91 | * @covers \eZ\Publish\Core\Persistence\Legacy\UserPreference\Handler::loadUserPreferences |
|