function XMLSitemapTaxonomyFunctionalTest::testTaxonomySettings in XML sitemap 6.2
Same name and namespace in other branches
- 7.2 xmlsitemap_taxonomy/xmlsitemap_taxonomy.test \XMLSitemapTaxonomyFunctionalTest::testTaxonomySettings()
File
- xmlsitemap_taxonomy/
xmlsitemap_taxonomy.test, line 29 - Unit tests for the xmlsitemap_taxonomy module.
Class
- XMLSitemapTaxonomyFunctionalTest
- @file Unit tests for the xmlsitemap_taxonomy module.
Code
function testTaxonomySettings() {
$this
->drupalLogin($this->admin_user);
$edit = array(
'name' => $this
->randomName(),
'xmlsitemap[status]' => '1',
'xmlsitemap[priority]' => '1.0',
);
$this
->drupalPost('admin/content/taxonomy/add/vocabulary', $edit, 'Save');
$this
->assertText("Created new vocabulary {$edit['name']}.");
$vid = db_result(db_query("SELECT vid FROM {vocabulary} WHERE name = '%s'", $edit['name']));
$vocabulary = taxonomy_vocabulary_load($vid);
$edit = array(
'name' => $this
->randomName(),
'xmlsitemap[status]' => 'default',
'xmlsitemap[priority]' => 'default',
);
$this
->drupalPost("admin/content/taxonomy/{$vid}/add/term", $edit, 'Save');
}