You are here

function NatWebTestCase::_create_vocabs in Node Auto Term [NAT] 6.2

Same name and namespace in other branches
  1. 6 tests/nat.test \NatWebTestCase::_create_vocabs()
  2. 7.2 tests/nat.test \NatWebTestCase::_create_vocabs()
  3. 7 tests/nat.test \NatWebTestCase::_create_vocabs()

Create two vocabularies for testing.

1 call to NatWebTestCase::_create_vocabs()
NatWebTestCase::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 48
NAT module functionality tests.

Class

NatWebTestCase
Base class for all NAT webtest cases.

Code

function _create_vocabs() {

  // Create 2 vocabularies
  $edit = array(
    'name' => $this->nat_vocab1_name,
  );
  $this
    ->drupalPost('admin/content/taxonomy/add/vocabulary', $edit, t('Save'));
  $edit = array(
    'name' => $this->nat_vocab2_name,
  );
  $this
    ->drupalPost('admin/content/taxonomy/add/vocabulary', $edit, t('Save'));
  $this->nat_vocab1 = $this
    ->_get_vocabulary_by_name($this->nat_vocab1_name);
  $this->nat_vocab2 = $this
    ->_get_vocabulary_by_name($this->nat_vocab2_name);
}