| @@ 59-71 (lines=13) @@ | ||
| 56 | /** |
|
| 57 | * Assert that the elements are. |
|
| 58 | */ |
|
| 59 | protected function assertSearchResults($expectedIds, $searchResult) |
|
| 60 | { |
|
| 61 | $result = array_map( |
|
| 62 | function ($hit) { |
|
| 63 | return $hit->valueObject->id; |
|
| 64 | }, |
|
| 65 | $searchResult->searchHits |
|
| 66 | ); |
|
| 67 | ||
| 68 | sort($result); |
|
| 69 | ||
| 70 | $this->assertEquals($expectedIds, $result); |
|
| 71 | } |
|
| 72 | ||
| 73 | /** |
|
| 74 | * Returns the content search handler to test. |
|
| @@ 58-70 (lines=13) @@ | ||
| 55 | /** |
|
| 56 | * Assert that the elements are. |
|
| 57 | */ |
|
| 58 | protected function assertSearchResults($expectedIds, $searchResult) |
|
| 59 | { |
|
| 60 | $ids = array_map( |
|
| 61 | function ($hit) { |
|
| 62 | return $hit->valueObject->id; |
|
| 63 | }, |
|
| 64 | $searchResult->searchHits |
|
| 65 | ); |
|
| 66 | ||
| 67 | sort($ids); |
|
| 68 | ||
| 69 | $this->assertEquals($expectedIds, $ids); |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * Returns the location search handler to test. |
|
| @@ 64-76 (lines=13) @@ | ||
| 61 | $this->assertEquals($expectedIds, $ids); |
|
| 62 | } |
|
| 63 | ||
| 64 | protected function getIds($searchResult) |
|
| 65 | { |
|
| 66 | $ids = array_map( |
|
| 67 | function ($hit) { |
|
| 68 | return $hit->valueObject->id; |
|
| 69 | }, |
|
| 70 | $searchResult->searchHits |
|
| 71 | ); |
|
| 72 | ||
| 73 | sort($ids); |
|
| 74 | ||
| 75 | return $ids; |
|
| 76 | } |
|
| 77 | ||
| 78 | protected function getContentTypeHandler() |
|
| 79 | { |
|