function OgVocabApiTestCase::testAutoCreateField in OG Vocabulary 7
Test creating of OG vocabuylary field when OG-vocab is saved.
File
- ./
og_vocab.test, line 418 - Test organic groups vocabulary module.
Class
Code
function testAutoCreateField() {
$type = $this->type;
$this
->assertFalse(field_info_instance('node', OG_VOCAB_FIELD, $type->type), 'OG-vocabulary does not exist.');
// Create a new OG-vocab.
$og_vocab = og_vocab_create_og_vocab($this->vid, 'node', $type->type);
$og_vocab
->save();
$this
->assertTrue(field_info_instance('node', OG_VOCAB_FIELD, $type->type), 'OG-vocabulary was created.');
}