|
@@ 581-592 (lines=12) @@
|
| 578 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 579 |
|
* @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContentInfo |
| 580 |
|
*/ |
| 581 |
|
public function testLoadContentInfoThrowsNotFoundException() |
| 582 |
|
{ |
| 583 |
|
$repository = $this->getRepository(); |
| 584 |
|
|
| 585 |
|
$nonExistentContentId = $this->generateId('object', self::DB_INT_MAX); |
| 586 |
|
/* BEGIN: Use Case */ |
| 587 |
|
$contentService = $repository->getContentService(); |
| 588 |
|
|
| 589 |
|
// This call will fail with a NotFoundException |
| 590 |
|
$contentService->loadContentInfo($nonExistentContentId); |
| 591 |
|
/* END: Use Case */ |
| 592 |
|
} |
| 593 |
|
|
| 594 |
|
/** |
| 595 |
|
* Test for the loadContentInfoList() method. |
|
@@ 800-811 (lines=12) @@
|
| 797 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 798 |
|
* @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadVersionInfoById |
| 799 |
|
*/ |
| 800 |
|
public function testLoadVersionInfoByIdThrowsNotFoundException() |
| 801 |
|
{ |
| 802 |
|
$repository = $this->getRepository(); |
| 803 |
|
|
| 804 |
|
$nonExistentContentId = $this->generateId('object', self::DB_INT_MAX); |
| 805 |
|
/* BEGIN: Use Case */ |
| 806 |
|
$contentService = $repository->getContentService(); |
| 807 |
|
|
| 808 |
|
// This call will fail with a "NotFoundException" |
| 809 |
|
$contentService->loadVersionInfoById($nonExistentContentId); |
| 810 |
|
/* END: Use Case */ |
| 811 |
|
} |
| 812 |
|
|
| 813 |
|
/** |
| 814 |
|
* Test for the loadContentByContentInfo() method. |
|
@@ 908-919 (lines=12) @@
|
| 905 |
|
* @expectedException \eZ\Publish\API\Repository\Exceptions\NotFoundException |
| 906 |
|
* @depends eZ\Publish\API\Repository\Tests\ContentServiceTest::testLoadContent |
| 907 |
|
*/ |
| 908 |
|
public function testLoadContentThrowsNotFoundException() |
| 909 |
|
{ |
| 910 |
|
$repository = $this->getRepository(); |
| 911 |
|
|
| 912 |
|
$nonExistentContentId = $this->generateId('object', self::DB_INT_MAX); |
| 913 |
|
/* BEGIN: Use Case */ |
| 914 |
|
$contentService = $repository->getContentService(); |
| 915 |
|
|
| 916 |
|
// This call will fail with a "NotFoundException" |
| 917 |
|
$contentService->loadContent($nonExistentContentId); |
| 918 |
|
/* END: Use Case */ |
| 919 |
|
} |
| 920 |
|
|
| 921 |
|
/** |
| 922 |
|
* Data provider for testLoadContentByRemoteId(). |