| @@ 1085-1100 (lines=16) @@ | ||
| 1082 | $this->assertQueryFixture($query, $fixture, null, true, false, false); |
|
| 1083 | } |
|
| 1084 | ||
| 1085 | public function testFindSingle() |
|
| 1086 | { |
|
| 1087 | $repository = $this->getRepository(); |
|
| 1088 | $searchService = $repository->getSearchService(); |
|
| 1089 | ||
| 1090 | $content = $searchService->findSingle( |
|
| 1091 | new Criterion\ContentId( |
|
| 1092 | array(4) |
|
| 1093 | ) |
|
| 1094 | ); |
|
| 1095 | ||
| 1096 | $this->assertEquals( |
|
| 1097 | 4, |
|
| 1098 | $content->id |
|
| 1099 | ); |
|
| 1100 | } |
|
| 1101 | ||
| 1102 | public function testFindNoPerformCount() |
|
| 1103 | { |
|
| @@ 1418-1428 (lines=11) @@ | ||
| 1415 | /** |
|
| 1416 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| 1417 | */ |
|
| 1418 | public function testFindSingleFailMultiple() |
|
| 1419 | { |
|
| 1420 | $repository = $this->getRepository(); |
|
| 1421 | $searchService = $repository->getSearchService(); |
|
| 1422 | ||
| 1423 | $searchService->findSingle( |
|
| 1424 | new Criterion\ContentId( |
|
| 1425 | array(4, 10) |
|
| 1426 | ) |
|
| 1427 | ); |
|
| 1428 | } |
|
| 1429 | ||
| 1430 | /** |
|
| 1431 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|