|
@@ 2200-2213 (lines=14) @@
|
| 2197 |
|
* @see \eZ\Publish\API\Repository\ContentService::loadVersionInfoById($contentId, $versionNo) |
| 2198 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 2199 |
|
*/ |
| 2200 |
|
public function testLoadVersionInfoByIdThrowsNotFoundExceptionWithSecondParameter() |
| 2201 |
|
{ |
| 2202 |
|
$repository = $this->getRepository(); |
| 2203 |
|
|
| 2204 |
|
$contentService = $repository->getContentService(); |
| 2205 |
|
|
| 2206 |
|
/* BEGIN: Use Case */ |
| 2207 |
|
$content = $this->createContentVersion1(); |
| 2208 |
|
|
| 2209 |
|
// This call will fail with a "NotFoundException", because not versionNo |
| 2210 |
|
// 2 exists for this content object. |
| 2211 |
|
$contentService->loadVersionInfoById($content->id, 2); |
| 2212 |
|
/* END: Use Case */ |
| 2213 |
|
} |
| 2214 |
|
|
| 2215 |
|
/** |
| 2216 |
|
* Test for the loadContentByVersionInfo() method. |
|
@@ 2559-2572 (lines=14) @@
|
| 2556 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 2557 |
|
* @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentWithThirdParameter |
| 2558 |
|
*/ |
| 2559 |
|
public function testLoadContentThrowsNotFoundExceptionWithThirdParameter() |
| 2560 |
|
{ |
| 2561 |
|
$repository = $this->getRepository(); |
| 2562 |
|
|
| 2563 |
|
$contentService = $repository->getContentService(); |
| 2564 |
|
|
| 2565 |
|
/* BEGIN: Use Case */ |
| 2566 |
|
$content = $this->createContentVersion1(); |
| 2567 |
|
|
| 2568 |
|
// This call will fail with a "NotFoundException", because for this |
| 2569 |
|
// content object no versionNo=2 exists. |
| 2570 |
|
$contentService->loadContent($content->id, null, 2); |
| 2571 |
|
/* END: Use Case */ |
| 2572 |
|
} |
| 2573 |
|
|
| 2574 |
|
/** |
| 2575 |
|
* Test for the loadContentByRemoteId() method. |