|
@@ 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 |