Code Duplication    Length = 12-13 lines in 2 locations

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

@@ 1039-1050 (lines=12) @@
1036
     *
1037
     * @return array
1038
     */
1039
    public function getPrioritizedLanguagesList()
1040
    {
1041
        return [
1042
            [[], null],
1043
            [['eng-GB'], null],
1044
            [['eng-US'], 'eng-US'],
1045
            [['ger-DE'], 'ger-DE'],
1046
            [['eng-US', 'ger-DE'], 'eng-US'],
1047
            [['ger-DE', 'eng-US'], 'ger-DE'],
1048
            [['eng-GB', 'ger-DE', 'eng-US'], 'ger-DE'],
1049
        ];
1050
    }
1051
1052
    /**
1053
     * Test that multi-language logic for loadObjectStateGroups respects prioritized language list.

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

@@ 2420-2432 (lines=13) @@
2417
     *
2418
     * @return array
2419
     */
2420
    public function getPrioritizedLanguageList()
2421
    {
2422
        return [
2423
            [[], null],
2424
            [['eng-US'], 'eng-US'],
2425
            [['eng-GB'], 'eng-GB'],
2426
            [['eng-US', 'eng-GB'], 'eng-US'],
2427
            [['eng-GB', 'eng-US'], 'eng-GB'],
2428
            // use non-existent group as the first one
2429
            [['ger-DE'], null],
2430
            [['ger-DE', 'eng-GB'], 'eng-GB'],
2431
        ];
2432
    }
2433
2434
    /**
2435
     * @param int $parentGroupId