|
@@ 506-517 (lines=12) @@
|
| 503 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 504 |
|
* @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentInfo |
| 505 |
|
*/ |
| 506 |
|
public function testLoadContentInfoThrowsNotFoundException() |
| 507 |
|
{ |
| 508 |
|
$repository = $this->getRepository(); |
| 509 |
|
|
| 510 |
|
$nonExistentContentId = $this->generateId('object', self::DB_INT_MAX); |
| 511 |
|
/* BEGIN: Use Case */ |
| 512 |
|
$contentService = $repository->getContentService(); |
| 513 |
|
|
| 514 |
|
// This call will fail with a NotFoundException |
| 515 |
|
$contentService->loadContentInfo($nonExistentContentId); |
| 516 |
|
/* END: Use Case */ |
| 517 |
|
} |
| 518 |
|
|
| 519 |
|
/** |
| 520 |
|
* Test for the loadContentInfoByRemoteId() method. |
|
@@ 619-630 (lines=12) @@
|
| 616 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 617 |
|
* @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadVersionInfoById |
| 618 |
|
*/ |
| 619 |
|
public function testLoadVersionInfoByIdThrowsNotFoundException() |
| 620 |
|
{ |
| 621 |
|
$repository = $this->getRepository(); |
| 622 |
|
|
| 623 |
|
$nonExistentContentId = $this->generateId('object', self::DB_INT_MAX); |
| 624 |
|
/* BEGIN: Use Case */ |
| 625 |
|
$contentService = $repository->getContentService(); |
| 626 |
|
|
| 627 |
|
// This call will fail with a "NotFoundException" |
| 628 |
|
$contentService->loadVersionInfoById($nonExistentContentId); |
| 629 |
|
/* END: Use Case */ |
| 630 |
|
} |
| 631 |
|
|
| 632 |
|
/** |
| 633 |
|
* Test for the loadContentByContentInfo() method. |
|
@@ 727-738 (lines=12) @@
|
| 724 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 725 |
|
* @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContent |
| 726 |
|
*/ |
| 727 |
|
public function testLoadContentThrowsNotFoundException() |
| 728 |
|
{ |
| 729 |
|
$repository = $this->getRepository(); |
| 730 |
|
|
| 731 |
|
$nonExistentContentId = $this->generateId('object', self::DB_INT_MAX); |
| 732 |
|
/* BEGIN: Use Case */ |
| 733 |
|
$contentService = $repository->getContentService(); |
| 734 |
|
|
| 735 |
|
// This call will fail with a "NotFoundException" |
| 736 |
|
$contentService->loadContent($nonExistentContentId); |
| 737 |
|
/* END: Use Case */ |
| 738 |
|
} |
| 739 |
|
|
| 740 |
|
/** |
| 741 |
|
* Test for the loadContentByRemoteId() method. |