|
@@ 2593-2606 (lines=14) @@
|
| 2590 |
|
* @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo) |
| 2591 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 2592 |
|
*/ |
| 2593 |
|
public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter() |
| 2594 |
|
{ |
| 2595 |
|
$repository = $this->getRepository(); |
| 2596 |
|
|
| 2597 |
|
$contentService = $repository->getContentService(); |
| 2598 |
|
|
| 2599 |
|
/* BEGIN: Use Case */ |
| 2600 |
|
$content = $this->createContentVersion1(); |
| 2601 |
|
|
| 2602 |
|
// This call will fail with a "NotFoundException", because not versionNo |
| 2603 |
|
// 2 exists for this content object. |
| 2604 |
|
$contentService->loadVersionInfoById($content->id, 2); |
| 2605 |
|
/* END: Use Case */ |
| 2606 |
|
} |
| 2607 |
|
|
| 2608 |
|
/** |
| 2609 |
|
* Test for the loadContentByVersionInfo() method. |
|
@@ 2977-2990 (lines=14) @@
|
| 2974 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 2975 |
|
* @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter |
| 2976 |
|
*/ |
| 2977 |
|
public function testLoadContentThrowsNotFoundExceptionWithThirdParameter() |
| 2978 |
|
{ |
| 2979 |
|
$repository = $this->getRepository(); |
| 2980 |
|
|
| 2981 |
|
$contentService = $repository->getContentService(); |
| 2982 |
|
|
| 2983 |
|
/* BEGIN: Use Case */ |
| 2984 |
|
$content = $this->createContentVersion1(); |
| 2985 |
|
|
| 2986 |
|
// This call will fail with a "NotFoundException", because for this |
| 2987 |
|
// content object no versionNo=2 exists. |
| 2988 |
|
$contentService->loadContent($content->id, null, 2); |
| 2989 |
|
/* END: Use Case */ |
| 2990 |
|
} |
| 2991 |
|
|
| 2992 |
|
/** |
| 2993 |
|
* Test for the loadContentByRemoteId() method. |