protected function SimplenewsSchedulerNodeCreationTest::setUp in Simplenews Scheduler 8
Overrides DrupalWebTestCase::setUp().
Overrides SimplenewsSchedulerWebTestBase::setUp
File
- src/
Tests/ SimplenewsSchedulerNodeCreationTest.php, line 22 - Simplenews scheduler node creation test functions.
Class
- SimplenewsSchedulerNodeCreationTest
- Testing generation of newsletters.
Namespace
Drupal\simplenews_scheduler\TestsCode
protected function setUp() {
parent::setUp();
$this
->drupalPlaceBlock('local_tasks_block');
$admin_user = $this
->drupalCreateUser(array(
'access content',
'administer nodes',
'create simplenews_issue content',
'edit own simplenews_issue content',
'send newsletter',
'send scheduled newsletters',
'overview scheduled newsletters',
));
$this
->drupalLogin($admin_user);
// Subscribe a user to simplenews.
$this->mail = 'test@example.org';
\Drupal::service('simplenews.subscription_manager')
->subscribe($this->mail, 'default', FALSE, 'test');
}