| @@ 890-905 (lines=16) @@ | ||
| 887 | ); |
|
| 888 | } |
|
| 889 | ||
| 890 | public function testFindSingle() |
|
| 891 | { |
|
| 892 | $repository = $this->getRepository(); |
|
| 893 | $searchService = $repository->getSearchService(); |
|
| 894 | ||
| 895 | $content = $searchService->findSingle( |
|
| 896 | new Criterion\ContentId( |
|
| 897 | array(4) |
|
| 898 | ) |
|
| 899 | ); |
|
| 900 | ||
| 901 | $this->assertEquals( |
|
| 902 | 4, |
|
| 903 | $content->id |
|
| 904 | ); |
|
| 905 | } |
|
| 906 | ||
| 907 | public function testFindNoPerformCount() |
|
| 908 | { |
|
| @@ 1223-1233 (lines=11) @@ | ||
| 1220 | /** |
|
| 1221 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| 1222 | */ |
|
| 1223 | public function testFindSingleFailMultiple() |
|
| 1224 | { |
|
| 1225 | $repository = $this->getRepository(); |
|
| 1226 | $searchService = $repository->getSearchService(); |
|
| 1227 | ||
| 1228 | $searchService->findSingle( |
|
| 1229 | new Criterion\ContentId( |
|
| 1230 | array(4, 10) |
|
| 1231 | ) |
|
| 1232 | ); |
|
| 1233 | } |
|
| 1234 | ||
| 1235 | /** |
|
| 1236 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|