protected function SimplenewsSchedulerNodeCreationTest::setUp in Simplenews Scheduler 2.0.x
Overrides DrupalWebTestCase::setUp().
Overrides SimplenewsSchedulerTestBase::setUp
File
- tests/
src/ Functional/ SimplenewsSchedulerNodeCreationTest.php, line 19
Class
- SimplenewsSchedulerNodeCreationTest
- Testing generation of newsletters.
Namespace
Drupal\Tests\simplenews_scheduler\FunctionalCode
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');
}