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