You are here

public function TagadelicTaxonomyAdminWebTestCase::testSelectedVocabulariesAreSaved in Tagadelic 7.2

File

tests/tagadelic_taxonomy.admin.test, line 70

Class

TagadelicTaxonomyAdminWebTestCase

Code

public function testSelectedVocabulariesAreSaved() {
  $values = $edit = array();
  $this
    ->createVocabularies(5);
  $this
    ->drupalGet($this->admin_url);

  //Create the form item
  foreach ($this->vocabularies as $vocabulary) {
    $values[$vocabulary->vid] = $vocabulary->vid;
    $key = "tagadelic_taxonomy_vocabularies[{$vocabulary->vid}]";
    $edit[$key] = TRUE;
  }
  $this
    ->drupalPost(NULL, $edit, "Save configuration");
  $this
    ->assertVariableIs("tagadelic_taxonomy_vocabularies", $values);
}