You are here

public function SimplenewsTestCase::setUp in Simplenews 6.2

Same name and namespace in other branches
  1. 7.2 tests/simplenews.test \SimplenewsTestCase::setUp()
  2. 7 tests/simplenews.test \SimplenewsTestCase::setUp()

Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix. A temporary files directory is created with the same name as the database prefix.

Parameters

...: List of modules to enable for the duration of the test. This can be either a single array or a variable number of string arguments.

Overrides DrupalWebTestCase::setUp

1 call to SimplenewsTestCase::setUp()
SimplenewsSendTestCase::setUp in tests/simplenews.test
Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
1 method overrides SimplenewsTestCase::setUp()
SimplenewsSendTestCase::setUp in tests/simplenews.test
Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…

File

tests/simplenews.test, line 14
Simplenews test functions.

Class

SimplenewsTestCase
@file Simplenews test functions.

Code

public function setUp() {
  parent::setUp('taxonomy', 'simplenews', 'token');

  //$this->simplenews_admin_user = $this->drupalCreateUser(array('administer newsletters', 'administer simplenews settings', 'administer simplenews subscriptions'));

  //$this->sender_user = $this->drupalCreateUser(array('create simplenews content', 'edit own simplenews content', 'send newsletter'));
  variable_set('site_mail', 'user@example.com');
}