|
@@ 277-286 (lines=10) @@
|
| 274 |
|
/** |
| 275 |
|
* @covers \eZ\Publish\Core\Repository\BookmarkService::isBookmarked |
| 276 |
|
*/ |
| 277 |
|
public function testLocationShouldNotBeBookmarked() |
| 278 |
|
{ |
| 279 |
|
$this->bookmarkHandler |
| 280 |
|
->expects($this->once()) |
| 281 |
|
->method('loadByUserIdAndLocationId') |
| 282 |
|
->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) |
| 283 |
|
->willReturn([]); |
| 284 |
|
|
| 285 |
|
$this->assertFalse($this->createBookmarkService()->isBookmarked($this->createLocation(self::LOCATION_ID))); |
| 286 |
|
} |
| 287 |
|
|
| 288 |
|
/** |
| 289 |
|
* @covers \eZ\Publish\Core\Repository\BookmarkService::isBookmarked |
|
@@ 291-300 (lines=10) @@
|
| 288 |
|
/** |
| 289 |
|
* @covers \eZ\Publish\Core\Repository\BookmarkService::isBookmarked |
| 290 |
|
*/ |
| 291 |
|
public function testLocationShouldBeBookmarked() |
| 292 |
|
{ |
| 293 |
|
$this->bookmarkHandler |
| 294 |
|
->expects($this->once()) |
| 295 |
|
->method('loadByUserIdAndLocationId') |
| 296 |
|
->with(self::CURRENT_USER_ID, [self::LOCATION_ID]) |
| 297 |
|
->willReturn([self::LOCATION_ID => new Bookmark()]); |
| 298 |
|
|
| 299 |
|
$this->assertTrue($this->createBookmarkService()->isBookmarked($this->createLocation(self::LOCATION_ID))); |
| 300 |
|
} |
| 301 |
|
|
| 302 |
|
private function assertLocationIsLoaded(Location $location): MockObject |
| 303 |
|
{ |