You are here

private function Update360Test::assertPermissions in Lightning Media 8.4

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/Update360Test.php \Drupal\Tests\lightning_media\Functional\Update360Test::assertPermissions()

Asserts that a role has the expected entity browser permissions.

Parameters

string $role_id: The ID of the role to check.

1 call to Update360Test::assertPermissions()
Update360Test::test in tests/src/Functional/Update360Test.php
Tests creating a CKEditor-specific media browser from the iFrame one.

File

tests/src/Functional/Update360Test.php, line 101

Class

Update360Test
Tests the optional configuration updates targeting Lightning Media 3.6.0.

Namespace

Drupal\Tests\lightning_media\Functional

Code

private function assertPermissions($role_id) {
  $role = Role::load($role_id);
  $this
    ->assertInstanceOf(Role::class, $role);
  $this
    ->assertTrue(Role::load($role_id)
    ->hasPermission('access ckeditor_media_browser entity browser pages'));
}