| @@ 1021-1036 (lines=16) @@ | ||
| 1018 | $this->assertQueryFixture($query, $fixture, null, true, false, false); |
|
| 1019 | } |
|
| 1020 | ||
| 1021 | public function testFindSingle() |
|
| 1022 | { |
|
| 1023 | $repository = $this->getRepository(); |
|
| 1024 | $searchService = $repository->getSearchService(); |
|
| 1025 | ||
| 1026 | $content = $searchService->findSingle( |
|
| 1027 | new Criterion\ContentId( |
|
| 1028 | [4] |
|
| 1029 | ) |
|
| 1030 | ); |
|
| 1031 | ||
| 1032 | $this->assertEquals( |
|
| 1033 | 4, |
|
| 1034 | $content->id |
|
| 1035 | ); |
|
| 1036 | } |
|
| 1037 | ||
| 1038 | public function testFindNoPerformCount() |
|
| 1039 | { |
|
| @@ 1352-1362 (lines=11) @@ | ||
| 1349 | /** |
|
| 1350 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| 1351 | */ |
|
| 1352 | public function testFindSingleFailMultiple() |
|
| 1353 | { |
|
| 1354 | $repository = $this->getRepository(); |
|
| 1355 | $searchService = $repository->getSearchService(); |
|
| 1356 | ||
| 1357 | $searchService->findSingle( |
|
| 1358 | new Criterion\ContentId( |
|
| 1359 | [4, 10] |
|
| 1360 | ) |
|
| 1361 | ); |
|
| 1362 | } |
|
| 1363 | ||
| 1364 | /** |
|
| 1365 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|