| @@ 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 | array(4) |
|
| 1029 | ) |
|
| 1030 | ); |
|
| 1031 | ||
| 1032 | $this->assertEquals( |
|
| 1033 | 4, |
|
| 1034 | $content->id |
|
| 1035 | ); |
|
| 1036 | } |
|
| 1037 | ||
| 1038 | public function testFindNoPerformCount() |
|
| 1039 | { |
|
| @@ 1354-1364 (lines=11) @@ | ||
| 1351 | /** |
|
| 1352 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| 1353 | */ |
|
| 1354 | public function testFindSingleFailMultiple() |
|
| 1355 | { |
|
| 1356 | $repository = $this->getRepository(); |
|
| 1357 | $searchService = $repository->getSearchService(); |
|
| 1358 | ||
| 1359 | $searchService->findSingle( |
|
| 1360 | new Criterion\ContentId( |
|
| 1361 | array(4, 10) |
|
| 1362 | ) |
|
| 1363 | ); |
|
| 1364 | } |
|
| 1365 | ||
| 1366 | /** |
|
| 1367 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|