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

@@ 2376-2388 (lines=13) @@
2373
     *
2374
     * @return array
2375
     */
2376
    public function getPrioritizedLanguageList()
2377
    {
2378
        return [
2379
            [[], null],
2380
            [['eng-US'], 'eng-US'],
2381
            [['eng-GB'], 'eng-GB'],
2382
            [['eng-US', 'eng-GB'], 'eng-US'],
2383
            [['eng-GB', 'eng-US'], 'eng-GB'],
2384
            // use non-existent group as the first one
2385
            [['ger-DE'], null],
2386
            [['ger-DE', 'eng-GB'], 'eng-GB'],
2387
        ];
2388
    }
2389
2390
    /**
2391
     * @param int $parentGroupId