Code Duplication    Length = 12-13 lines in 2 locations

eZ/Publish/API/Repository/Tests/ObjectStateServiceTest.php 1 location

@@ 1029-1040 (lines=12) @@
1026
     *
1027
     * @return array
1028
     */
1029
    public function getPrioritizedLanguagesList()
1030
    {
1031
        return [
1032
            [[], null],
1033
            [['eng-GB'], null],
1034
            [['eng-US'], 'eng-US'],
1035
            [['ger-DE'], 'ger-DE'],
1036
            [['eng-US', 'ger-DE'], 'eng-US'],
1037
            [['ger-DE', 'eng-US'], 'ger-DE'],
1038
            [['eng-GB', 'ger-DE', 'eng-US'], 'ger-DE'],
1039
        ];
1040
    }
1041
1042
    /**
1043
     * Test that multi-language logic for loadObjectStateGroups respects prioritized language list.

eZ/Publish/API/Repository/Tests/UserServiceTest.php 1 location

@@ 2455-2467 (lines=13) @@
2452
     *
2453
     * @return array
2454
     */
2455
    public function getPrioritizedLanguageList()
2456
    {
2457
        return [
2458
            [[], null],
2459
            [['eng-US'], 'eng-US'],
2460
            [['eng-GB'], 'eng-GB'],
2461
            [['eng-US', 'eng-GB'], 'eng-US'],
2462
            [['eng-GB', 'eng-US'], 'eng-GB'],
2463
            // use non-existent group as the first one
2464
            [['ger-DE'], null],
2465
            [['ger-DE', 'eng-GB'], 'eng-GB'],
2466
        ];
2467
    }
2468
2469
    /**
2470
     * @param int $parentGroupId