You are here

public function MessageDigestUiTest::setUp in Message Digest 8

Overrides MessageSubscribeEmailTestBase::setUp

File

message_digest_ui/tests/src/Kernel/MessageDigestUiTest.php, line 29

Class

MessageDigestUiTest
Basic tests for the Message Digest UI module.

Namespace

Drupal\Tests\message_digest_ui\Kernel

Code

public function setUp() {
  parent::setUp();
  $this
    ->installConfig([
    'message_digest_ui',
    'message_subscribe_email',
    'message_subscribe',
  ]);
  $this->messageSubscribers = $this->container
    ->get('message_subscribe.subscribers');

  // Add a few more users.
  $permissions = [
    'flag subscribe_node',
    'unflag subscribe_node',
    'flag email_node',
    'unflag email_node',
  ];
  foreach (range(3, 4) as $i) {
    $this->users[$i] = $this
      ->createUser($permissions);
  }

  // Add an additional node.
  $type = $this->nodes[1]
    ->getType();
  $this->nodes[2] = $this
    ->createNode([
    'type' => $type,
  ]);
}