Code Duplication    Length = 13-13 lines in 2 locations

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerContentTest.php 1 location

@@ 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.

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerLocationTest.php 1 location

@@ 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.