public function MessageUiShowPreviewTest::setUp in Message UI 8
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ MessageUiShowPreviewTest.php, line 18
Class
- MessageUiShowPreviewTest
- Testing the display of the preview.
Namespace
Drupal\Tests\message_ui\FunctionalCode
public function setUp() {
parent::setUp();
$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',
]);
// Grant and check create permissions for a message.
$this
->grantMessageUiPermission('create');
// Don't show the text of the message.
$this
->configSet('show_preview', TRUE);
}