function SimpleNewsSchedulerNodeCreationTest::setUp in Simplenews Scheduler 7
Same name and namespace in other branches
- 6.2 tests/simplenews_scheduler.test \SimpleNewsSchedulerNodeCreationTest::setUp()
Declares the module dependencies for the test.
Overrides SimpleNewsSchedulerWebTestCase::setUp
File
- tests/
simplenews_scheduler.test, line 58 - Tests for Simplenews Scheduler.
Class
- SimpleNewsSchedulerNodeCreationTest
- Test scheduled edition creation.
Code
function setUp() {
parent::setUp();
$this->privileged_user = $this
->drupalCreateUser(array(
'access content',
'administer nodes',
'create simplenews content',
'edit own simplenews content',
'send newsletter',
'send scheduled newsletters',
'overview scheduled newsletters',
));
$this
->drupalLogin($this->privileged_user);
// Subscribe a user to simplenews.
$categories = simplenews_categories_load_multiple();
$this->mail = 'test@example.org';
simplenews_subscribe_user($this->mail, key($categories), FALSE, 'test');
}