LayoutFieldTranslateUpdateConfig.php

Namespace

Drupal\Tests\layout_builder\Functional\Update\Translatability

File

core/modules/layout_builder/tests/src/Functional/Update/Translatability/LayoutFieldTranslateUpdateConfig.php

View source
<?php

namespace Drupal\Tests\layout_builder\Functional\Update\Translatability;


/**
 * A test case that updates 1 bundle's field but not both.
 *
 * @group layout_builder
 * @group legacy
 */
class LayoutFieldTranslateUpdateConfig extends MakeLayoutUntranslatableUpdatePathTestBase {
    
    /**
     * {@inheritdoc}
     */
    protected $layoutBuilderTestCases = [
        'article' => [
            'has_translation' => TRUE,
            'has_layout' => TRUE,
            'nid' => 1,
            'vid' => 2,
        ],
        'page' => [
            'has_translation' => FALSE,
            'has_layout' => FALSE,
            'nid' => 4,
            'vid' => 5,
        ],
    ];
    
    /**
     * {@inheritdoc}
     */
    protected $expectedBundleUpdates = [
        'article' => FALSE,
        'page' => TRUE,
    ];
    
    /**
     * {@inheritdoc}
     */
    protected $expectedFieldStorageUpdate = FALSE;

}

Classes

Title Deprecated Summary
LayoutFieldTranslateUpdateConfig A test case that updates 1 bundle's field but not both.

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