eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerContentTest.php 1 location
|
@@ 64-76 (lines=13) @@
|
| 61 |
|
/** |
| 62 |
|
* Assert that the elements are. |
| 63 |
|
*/ |
| 64 |
|
protected function assertSearchResults($expectedIds, $searchResult) |
| 65 |
|
{ |
| 66 |
|
$result = array_map( |
| 67 |
|
function ($hit) { |
| 68 |
|
return $hit->valueObject->id; |
| 69 |
|
}, |
| 70 |
|
$searchResult->searchHits |
| 71 |
|
); |
| 72 |
|
|
| 73 |
|
sort($result); |
| 74 |
|
|
| 75 |
|
$this->assertEquals($expectedIds, $result); |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
/** |
| 79 |
|
* Returns the content search handler to test. |
eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerLocationTest.php 1 location
|
@@ 62-74 (lines=13) @@
|
| 59 |
|
/** |
| 60 |
|
* Assert that the elements are. |
| 61 |
|
*/ |
| 62 |
|
protected function assertSearchResults($expectedIds, $searchResult) |
| 63 |
|
{ |
| 64 |
|
$ids = array_map( |
| 65 |
|
function ($hit) { |
| 66 |
|
return $hit->valueObject->id; |
| 67 |
|
}, |
| 68 |
|
$searchResult->searchHits |
| 69 |
|
); |
| 70 |
|
|
| 71 |
|
sort($ids); |
| 72 |
|
|
| 73 |
|
$this->assertEquals($expectedIds, $ids); |
| 74 |
|
} |
| 75 |
|
|
| 76 |
|
/** |
| 77 |
|
* Returns the location search handler to test. |