function LayoutBuilderPermissionsUpdatePathTest::testRunUpdates

Tests the upgrade path for Layout Builder permissions.

File

core/modules/layout_builder/tests/src/Functional/Update/LayoutBuilderPermissionsUpdatePathTest.php, line 32

Class

LayoutBuilderPermissionsUpdatePathTest
Tests the upgrade path for Layout Builder permissions.

Namespace

Drupal\Tests\layout_builder\Functional\Update

Code

public function testRunUpdates() {
    $this->assertFalse(Role::load(Role::AUTHENTICATED_ID)->hasPermission('create and edit custom blocks'));
    $this->runUpdates();
    $this->assertTrue(Role::load(Role::AUTHENTICATED_ID)->hasPermission('create and edit custom blocks'));
}

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