You are here

private function Update360Test::assertPermissions in Lightning Media 8.3

Same name and namespace in other branches
  1. 8.4 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 the update.

File

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

Class

Update360Test
Tests the update to 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
    ->hasPermission('access ckeditor_media_browser entity browser pages'));
  $this
    ->assertTrue($role
    ->hasPermission('access media_browser entity browser pages'));
}