| @@ 1050-1065 (lines=16) @@ | ||
| 1047 | $this->assertQueryFixture($query, $fixture, null, true, false, false); |
|
| 1048 | } |
|
| 1049 | ||
| 1050 | public function testFindSingle() |
|
| 1051 | { |
|
| 1052 | $repository = $this->getRepository(); |
|
| 1053 | $searchService = $repository->getSearchService(); |
|
| 1054 | ||
| 1055 | $content = $searchService->findSingle( |
|
| 1056 | new Criterion\ContentId( |
|
| 1057 | [4] |
|
| 1058 | ) |
|
| 1059 | ); |
|
| 1060 | ||
| 1061 | $this->assertEquals( |
|
| 1062 | 4, |
|
| 1063 | $content->id |
|
| 1064 | ); |
|
| 1065 | } |
|
| 1066 | ||
| 1067 | public function testFindNoPerformCount() |
|
| 1068 | { |
|
| @@ 1518-1528 (lines=11) @@ | ||
| 1515 | /** |
|
| 1516 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| 1517 | */ |
|
| 1518 | public function testFindSingleFailMultiple() |
|
| 1519 | { |
|
| 1520 | $repository = $this->getRepository(); |
|
| 1521 | $searchService = $repository->getSearchService(); |
|
| 1522 | ||
| 1523 | $searchService->findSingle( |
|
| 1524 | new Criterion\ContentId( |
|
| 1525 | [4, 10] |
|
| 1526 | ) |
|
| 1527 | ); |
|
| 1528 | } |
|
| 1529 | ||
| 1530 | /** |
|
| 1531 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|