function SectionDependenciesUpdatePathTest::testRunUpdates

Tests the upgrade path for Layout Builder section dependencies.

File

core/modules/layout_builder/tests/src/Functional/Update/SectionDependenciesUpdatePathTest.php, line 30

Class

SectionDependenciesUpdatePathTest
Tests the upgrade path for Layout Builder section dependencies.

Namespace

Drupal\Tests\layout_builder\Functional\Update

Code

public function testRunUpdates() {
    $data = EntityViewDisplay::load('node.article.teaser')->toArray();
    $this->assertNotContains('system.menu.myothermenu', $data['dependencies']['config']);
    $this->assertNotContains('layout_builder', $data['dependencies']['module']);
    $this->assertNotContains('layout_test', $data['dependencies']['module']);
    $this->runUpdates();
    $data = EntityViewDisplay::load('node.article.teaser')->toArray();
    $this->assertContains('system.menu.myothermenu', $data['dependencies']['config']);
    $this->assertContains('layout_builder', $data['dependencies']['module']);
    $this->assertContains('layout_test', $data['dependencies']['module']);
}

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