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

@@ 2388-2400 (lines=13) @@
2385
     *
2386
     * @return array
2387
     */
2388
    public function getPrioritizedLanguageList()
2389
    {
2390
        return [
2391
            [[], null],
2392
            [['eng-US'], 'eng-US'],
2393
            [['eng-GB'], 'eng-GB'],
2394
            [['eng-US', 'eng-GB'], 'eng-US'],
2395
            [['eng-GB', 'eng-US'], 'eng-GB'],
2396
            // use non-existent group as the first one
2397
            [['ger-DE'], null],
2398
            [['ger-DE', 'eng-GB'], 'eng-GB'],
2399
        ];
2400
    }
2401
2402
    /**
2403
     * @param int $parentGroupId