You are here

protected function CourierMessageQueueManagerTest::setUp in Courier 8

Same name and namespace in other branches
  1. 2.x tests/src/Kernel/CourierMessageQueueManagerTest.php \Drupal\Tests\courier\Kernel\CourierMessageQueueManagerTest::setUp()

Overrides KernelTestBase::setUp

File

tests/src/Kernel/CourierMessageQueueManagerTest.php, line 26

Class

CourierMessageQueueManagerTest
Tests message queue manager.

Namespace

Drupal\Tests\courier\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installConfig([
    'courier',
  ]);
  $this
    ->installEntitySchema('courier_message_queue_item');
  $this
    ->installEntitySchema('courier_test_message');
  $this
    ->installEntitySchema('user');
  $this->messageQueue = $this->container
    ->get('courier.manager.message_queue');
  $this
    ->config('courier.settings')
    ->set('skip_queue', TRUE)
    ->set('channel_preferences', [
    'user' => [
      'courier_test_message',
    ],
  ])
    ->save();
}