Code Duplication    Length = 13-13 lines in 2 locations

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

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

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

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