function EntityDecoupledTranslationRevisionsTest::dataTestUntranslatableFields

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php \Drupal\KernelTests\Core\Entity\EntityDecoupledTranslationRevisionsTest::dataTestUntranslatableFields()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php \Drupal\KernelTests\Core\Entity\EntityDecoupledTranslationRevisionsTest::dataTestUntranslatableFields()
  3. 10 core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php \Drupal\KernelTests\Core\Entity\EntityDecoupledTranslationRevisionsTest::dataTestUntranslatableFields()

Data provider for ::testUntranslatableFields.

File

core/tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php, line 214

Class

EntityDecoupledTranslationRevisionsTest
Test decoupled translation revisions.

Namespace

Drupal\KernelTests\Core\Entity

Code

public static function dataTestUntranslatableFields() {
    $sets = [];
    $sets['Default behavior - Untranslatable fields affect all revisions'] = [
        [
            [
                'en',
                TRUE,
                TRUE,
            ],
            [
                'it',
                FALSE,
                TRUE,
                FALSE,
            ],
            [
                'en',
                FALSE,
                TRUE,
                FALSE,
            ],
            [
                'en',
                TRUE,
                TRUE,
            ],
            [
                'it',
                TRUE,
                TRUE,
            ],
            [
                'en',
                FALSE,
            ],
            [
                'it',
                FALSE,
            ],
            [
                'en',
                TRUE,
            ],
            [
                'it',
                TRUE,
            ],
        ],
        FALSE,
    ];
    $sets['Alternative behavior - Untranslatable fields affect only default translation'] = [
        [
            [
                'en',
                TRUE,
                TRUE,
            ],
            [
                'it',
                FALSE,
                TRUE,
                FALSE,
            ],
            [
                'en',
                FALSE,
                TRUE,
            ],
            [
                'it',
                TRUE,
                TRUE,
                FALSE,
            ],
            [
                'it',
                FALSE,
            ],
            [
                'it',
                TRUE,
            ],
            [
                'en',
                TRUE,
                TRUE,
            ],
            [
                'it',
                FALSE,
            ],
            [
                'en',
                FALSE,
            ],
            [
                'it',
                TRUE,
            ],
            [
                'en',
                TRUE,
                TRUE,
            ],
        ],
        TRUE,
    ];
    return $sets;
}

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