Code Duplication    Length = 17-17 lines in 3 locations

eZ/Publish/API/Repository/Tests/SearchServiceTranslationLanguageFallbackTest.php 3 locations

@@ 1636-1652 (lines=17) @@
1633
1634
        $this->assertEquals(count($contentDataList), $searchResult->totalCount);
1635
1636
        foreach ($contentDataList as $index => $contentData) {
1637
            list($contentNo, $translationLanguageCode, $indexMap) = $contentData;
1638
            list($index, $contentNo) = $this->getIndexesToMatchData($contentData, $index, $contentNo);
1639
1640
            /** @var \eZ\Publish\Api\Repository\Values\Content\Content $content */
1641
            $content = $searchResult->searchHits[$index]->valueObject;
1642
1643
            $this->assertEquals(
1644
                $data[$contentNo]['content']->id,
1645
                $content->id
1646
            );
1647
            $this->assertIndexName($indexMap, $searchResult->searchHits[$index]);
1648
            $this->assertEquals(
1649
                $translationLanguageCode,
1650
                $searchResult->searchHits[$index]->matchedTranslation
1651
            );
1652
        }
1653
    }
1654
1655
    /**
@@ 1690-1706 (lines=17) @@
1687
1688
        $this->assertEquals(count($contentDataList), $searchResult->totalCount);
1689
1690
        foreach ($contentDataList as $index => $contentData) {
1691
            list($contentNo, $translationLanguageCode, $indexMap) = $contentData;
1692
            list($index, $contentNo) = $this->getIndexesToMatchData($contentData, $index, $contentNo);
1693
1694
            /** @var \eZ\Publish\Api\Repository\Values\Content\Location $location */
1695
            $location = $searchResult->searchHits[$index]->valueObject;
1696
1697
            $this->assertEquals(
1698
                $data[$contentNo]['locations'][0]->id,
1699
                $location->id
1700
            );
1701
            $this->assertIndexName($indexMap, $searchResult->searchHits[$index]);
1702
            $this->assertEquals(
1703
                $translationLanguageCode,
1704
                $searchResult->searchHits[$index]->matchedTranslation
1705
            );
1706
        }
1707
    }
1708
1709
    /**
@@ 1740-1756 (lines=17) @@
1737
1738
        $this->assertEquals(count($contentDataList) * 2, $searchResult->totalCount);
1739
1740
        foreach ($contentDataList as $index => $contentData) {
1741
            list($contentNo, $translationLanguageCode, $indexMap) = $contentData;
1742
            list($index, $contentNo) = $this->getIndexesToMatchData($contentData, $index, $contentNo);
1743
1744
            /** @var \eZ\Publish\Api\Repository\Values\Content\Location $location */
1745
            $location = $searchResult->searchHits[$index]->valueObject;
1746
1747
            $this->assertEquals(
1748
                $data[$contentNo]['locations'][0]->id,
1749
                $location->id
1750
            );
1751
            $this->assertIndexName($indexMap, $searchResult->searchHits[$index]);
1752
            $this->assertEquals(
1753
                $translationLanguageCode,
1754
                $searchResult->searchHits[$index]->matchedTranslation
1755
            );
1756
        }
1757
1758
        foreach ($contentDataList as $index => $contentData) {
1759
            list($contentNo, $translationLanguageCode, $indexMap) = $contentData;