You are here

public function MessageUiPermissionsTest::setUp in Message UI 8

Overrides BrowserTestBase::setUp

File

tests/src/Functional/MessageUiPermissionsTest.php, line 28

Class

MessageUiPermissionsTest
Testing the message access use case.

Namespace

Drupal\Tests\message_ui\Functional

Code

public function setUp() {
  parent::setUp();
  $this->accessHandler = \Drupal::entityTypeManager()
    ->getAccessControlHandler('message');
  $this->account = $this
    ->drupalCreateUser();

  // Load 'authenticated' user role.
  $this->rid = Role::load(RoleInterface::AUTHENTICATED_ID)
    ->id();

  // Create Message template foo.
  $this
    ->createMessageTemplate('foo', 'Dummy test', 'Example text.', [
    'Dummy message',
  ]);
}