public function SiteMapCategoriesTest::testCategoryDescription in Site map 8
Tests category description.
File
- src/
Tests/ SiteMapCategoriesTest.php, line 33
Class
- SiteMapCategoriesTest
- Test case class for site map categories tests.
Namespace
Drupal\site_map\TestsCode
public function testCategoryDescription() {
// Assert that category description is included in the site map by default.
$this
->drupalGet('/sitemap');
$this
->assertText($this->vocabulary->description, 'Category description is included.');
// Configure module not to show category description.
$edit = array(
'show_description' => FALSE,
);
$this
->drupalPostForm('admin/config/search/sitemap', $edit, t('Save configuration'));
// Assert that category description is not included in the site map.
$this
->drupalGet('/sitemap');
$this
->assertNoText($this->vocabulary->description, 'Category description is not included.');
}