| @@ 1000-1015 (lines=16) @@ | ||
| 997 | $this->assertQueryFixture($query, $fixture, $this->getContentInfoFixtureClosure($closure), true, true, false); |
|
| 998 | } |
|
| 999 | ||
| 1000 | public function testFindSingle() |
|
| 1001 | { |
|
| 1002 | $repository = $this->getRepository(); |
|
| 1003 | $searchService = $repository->getSearchService(); |
|
| 1004 | ||
| 1005 | $content = $searchService->findSingle( |
|
| 1006 | new Criterion\ContentId( |
|
| 1007 | array(4) |
|
| 1008 | ) |
|
| 1009 | ); |
|
| 1010 | ||
| 1011 | $this->assertEquals( |
|
| 1012 | 4, |
|
| 1013 | $content->id |
|
| 1014 | ); |
|
| 1015 | } |
|
| 1016 | ||
| 1017 | public function testFindNoPerformCount() |
|
| 1018 | { |
|
| @@ 1333-1343 (lines=11) @@ | ||
| 1330 | /** |
|
| 1331 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|
| 1332 | */ |
|
| 1333 | public function testFindSingleFailMultiple() |
|
| 1334 | { |
|
| 1335 | $repository = $this->getRepository(); |
|
| 1336 | $searchService = $repository->getSearchService(); |
|
| 1337 | ||
| 1338 | $searchService->findSingle( |
|
| 1339 | new Criterion\ContentId( |
|
| 1340 | array(4, 10) |
|
| 1341 | ) |
|
| 1342 | ); |
|
| 1343 | } |
|
| 1344 | ||
| 1345 | /** |
|
| 1346 | * @expectedException \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
|