You are here

function BlogAPITestCase::updateVocabulary in Blog API 7

Update a taxonomy vocabulary.

Parameters

$vocab: Vocabulary name.

Return value

integer The vocab ID.

1 call to BlogAPITestCase::updateVocabulary()
BlogAPITestCase::testBlogAPI in ./blogapi.test
Create, edit, and delete post; upload file; set/get categories.

File

./blogapi.test, line 163

Class

BlogAPITestCase

Code

function updateVocabulary($vid, $vocab, $multiple = FALSE, $required = FALSE) {
  $vocabulary = taxonomy_vocabulary_load($vid);
  $vocabulary->name = $vocab;
  $vocabulary->nodes = array(
    'blog' => 'blog',
  );
  $vocabulary->multiple = $multiple;
  $vocabulary->required = $required;
  taxonomy_vocabulary_save($vocabulary);
}