You are here

public function NatWebTestCase::setUp in Node Auto Term [NAT] 6

Same name and namespace in other branches
  1. 6.2 tests/nat.test \NatWebTestCase::setUp()
  2. 7.2 tests/nat.test \NatWebTestCase::setUp()
  3. 7 tests/nat.test \NatWebTestCase::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

3 calls to NatWebTestCase::setUp()
NatBasicTest::setUp in tests/nat.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.…
NatSecondaryTest::setUp in tests/nat.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.…
NatSettingsTest::setUp in tests/nat.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.…
3 methods override NatWebTestCase::setUp()
NatBasicTest::setUp in tests/nat.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.…
NatSecondaryTest::setUp in tests/nat.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.…
NatSettingsTest::setUp in tests/nat.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/nat.test, line 26
NAT module functionality tests.

Class

NatWebTestCase
Base class for all NAT webtest cases.

Code

public function setUp() {
  parent::setUp('nat');
  $this->nat_admin_user = $this
    ->drupalCreateUser(array(
    'administer NAT configuration',
    'administer taxonomy',
  ));
  $this->nat_user = $this
    ->drupalCreateUser(array(
    'create story content',
    'edit own story content',
    'delete own story content',
  ));
  $this
    ->drupalLogin($this->nat_admin_user);
  $this->nat_vocab1_name = $this
    ->randomName();
  $this->nat_vocab2_name = $this
    ->randomName();
  $this->nat_node_title = $this
    ->randomName();
  $this->nat_node_body = $this
    ->randomName();
  $this->nat_type = 'story';
  $this
    ->_create_vocabs();
  $this
    ->drupalLogout($this->nat_admin_user);
}