protected function CourierTest::setUp in Courier 8
Same name and namespace in other branches
- 2.x src/Tests/CourierTest.php \Drupal\courier\Tests\CourierTest::setUp()
Sets up the test.
Overrides KernelTestBase::setUp
File
- src/
Tests/ CourierTest.php, line 44 - Contains \Drupal\courier\Tests\CourierTest.
Class
- CourierTest
- Courier test.
Namespace
Drupal\courier\TestsCode
protected function setUp() {
parent::setUp();
$this->courierManager = \Drupal::service('courier.manager');
$this
->installSchema('system', [
'queue',
]);
$this
->installEntitySchema('user');
$this
->installEntitySchema('courier_email');
$this
->installEntitySchema('courier_template_collection');
$this
->installEntitySchema('courier_message_queue_item');
$this
->installEntitySchema('entity_test');
$this
->installConfig([
'courier',
]);
$this
->config('system.mail')
->set('interface.default', 'test_mail_collector')
->save();
$this->identity = User::create([
'uid' => 1,
'name' => $this
->randomMachineName(),
]);
$this->identity
->setEmail('test@example.local')
->save();
}