function NatWebTestCase::_create_vocabs in Node Auto Term [NAT] 7.2
Same name and namespace in other branches
- 6.2 tests/nat.test \NatWebTestCase::_create_vocabs()
- 6 tests/nat.test \NatWebTestCase::_create_vocabs()
- 7 tests/nat.test \NatWebTestCase::_create_vocabs()
Create two vocabularies for testing.
1 call to NatWebTestCase::_create_vocabs()
- NatWebTestCase::setUp in tests/
nat.test - Sets up a Drupal site for running functional and integration tests.
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,
'machine_name' => strtolower($this->nat_vocab1_name),
);
$this
->drupalPost('admin/structure/taxonomy/add', $edit, t('Save'));
$edit = array(
'name' => $this->nat_vocab2_name,
'machine_name' => strtolower($this->nat_vocab2_name),
);
$this
->drupalPost('admin/structure/taxonomy/add', $edit, t('Save'));
$this->nat_vocab1 = taxonomy_vocabulary_machine_name_load($this->nat_vocab1_name);
$this->nat_vocab2 = taxonomy_vocabulary_machine_name_load($this->nat_vocab2_name);
}