You are here

public function LayoutBuilderPermissionsUpdatePathTest::testRunUpdates in Drupal 8

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'));
}