function LocaleLookupTest::resolveCacheMissWithFallbackProvider

Same name in other branches
  1. 9 core/modules/locale/tests/src/Unit/LocaleLookupTest.php \Drupal\Tests\locale\Unit\LocaleLookupTest::resolveCacheMissWithFallbackProvider()
  2. 8.9.x core/modules/locale/tests/src/Unit/LocaleLookupTest.php \Drupal\Tests\locale\Unit\LocaleLookupTest::resolveCacheMissWithFallbackProvider()
  3. 10 core/modules/locale/tests/src/Unit/LocaleLookupTest.php \Drupal\Tests\locale\Unit\LocaleLookupTest::resolveCacheMissWithFallbackProvider()

Provides test data for testResolveCacheMissWithFallback().

File

core/modules/locale/tests/src/Unit/LocaleLookupTest.php, line 198

Class

LocaleLookupTest
@coversDefaultClass \Drupal\locale\LocaleLookup @group locale

Namespace

Drupal\Tests\locale\Unit

Code

public static function resolveCacheMissWithFallbackProvider() {
    // cSpell:disable
    return [
        [
            'cs',
            'test',
            'irrelevant',
            'test v české',
        ],
        [
            'cs',
            'fake',
            'irrelevant',
            'falešný',
        ],
        [
            'cs',
            'missing pl',
            'irrelevant',
            'chybějící pl',
        ],
        [
            'cs',
            'missing cs',
            'irrelevant',
            'missing cs',
        ],
        [
            'cs',
            'missing both',
            'irrelevant',
            'missing both',
        ],
        // Testing PL with fallback to cs, en.
[
            'pl',
            'test',
            'irrelevant',
            'test po polsku',
        ],
        [
            'pl',
            'fake',
            'irrelevant',
            'ściema',
        ],
        [
            'pl',
            'missing pl',
            'irrelevant',
            'chybějící pl',
        ],
        [
            'pl',
            'missing cs',
            'irrelevant',
            'zaginiony czech',
        ],
        [
            'pl',
            'missing both',
            'irrelevant',
            'missing both',
        ],
    ];
    // cSpell:enable
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.