|
@@ 2437-2450 (lines=14) @@
|
| 2434 |
|
* @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo) |
| 2435 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 2436 |
|
*/ |
| 2437 |
|
public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter() |
| 2438 |
|
{ |
| 2439 |
|
$repository = $this->getRepository(); |
| 2440 |
|
|
| 2441 |
|
$contentService = $repository->getContentService(); |
| 2442 |
|
|
| 2443 |
|
/* BEGIN: Use Case */ |
| 2444 |
|
$content = $this->createContentVersion1(); |
| 2445 |
|
|
| 2446 |
|
// This call will fail with a "NotFoundException", because not versionNo |
| 2447 |
|
// 2 exists for this content object. |
| 2448 |
|
$contentService->loadVersionInfoById($content->id, 2); |
| 2449 |
|
/* END: Use Case */ |
| 2450 |
|
} |
| 2451 |
|
|
| 2452 |
|
/** |
| 2453 |
|
* Test for the loadContentByVersionInfo() method. |
|
@@ 2815-2828 (lines=14) @@
|
| 2812 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 2813 |
|
* @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter |
| 2814 |
|
*/ |
| 2815 |
|
public function testLoadContentThrowsNotFoundExceptionWithThirdParameter() |
| 2816 |
|
{ |
| 2817 |
|
$repository = $this->getRepository(); |
| 2818 |
|
|
| 2819 |
|
$contentService = $repository->getContentService(); |
| 2820 |
|
|
| 2821 |
|
/* BEGIN: Use Case */ |
| 2822 |
|
$content = $this->createContentVersion1(); |
| 2823 |
|
|
| 2824 |
|
// This call will fail with a "NotFoundException", because for this |
| 2825 |
|
// content object no versionNo=2 exists. |
| 2826 |
|
$contentService->loadContent($content->id, null, 2); |
| 2827 |
|
/* END: Use Case */ |
| 2828 |
|
} |
| 2829 |
|
|
| 2830 |
|
/** |
| 2831 |
|
* Test for the loadContentByRemoteId() method. |