public function QueueTest::setUp in Message Subscribe 8
Overrides MessageSubscribeTestBase::setUp
File
- tests/
src/ Kernel/ QueueTest.php, line 27
Class
- QueueTest
- Test queue integration.
Namespace
Drupal\Tests\message_subscribe\KernelCode
public function setUp() {
parent::setUp();
$this
->config('message_subscribe.settings')
->set('default_notifiers', [])
->set('use_queue', TRUE)
->save();
$this->messageSubscribers = $this->container
->get('message_subscribe.subscribers');
// Create a dummy message-type.
$message_type = MessageTemplate::create([
'template' => 'foo',
'message_text' => [
'value' => 'Example text.',
],
]);
$message_type
->save();
// Create node-type.
$type = $this
->createContentType();
$node_type = $type
->id();
// Create node.
$user1 = $this
->createUser();
$settings = [];
$settings['type'] = $node_type;
$settings['uid'] = $user1
->id();
$this->node = $this
->createNode($settings);
}