public function SimplesitemapTest::testDisableEntityType in Simple XML sitemap 8.2
Same name and namespace in other branches
- 8.3 tests/src/Functional/SimplesitemapTest.php \Drupal\Tests\simple_sitemap\Functional\SimplesitemapTest::testDisableEntityType()
- 4.x tests/src/Functional/SimplesitemapTest.php \Drupal\Tests\simple_sitemap\Functional\SimplesitemapTest::testDisableEntityType()
Test disabling sitemap support for an entity type.
File
- tests/
src/ Functional/ SimplesitemapTest.php, line 439
Class
- SimplesitemapTest
- Tests Simple XML sitemap functional integration.
Namespace
Drupal\Tests\simple_sitemap\FunctionalCode
public function testDisableEntityType() {
$this->generator
->setBundleSettings('node', 'page')
->disableEntityType('node');
$this
->drupalLogin($this->privilegedUser);
$this
->drupalGet('admin/structure/types/manage/page');
$this
->assertSession()
->pageTextNotContains('Simple XML sitemap');
$this->generator
->generateSitemap('nobatch');
$this
->drupalGet('sitemap.xml');
$this
->assertSession()
->responseNotContains('node/' . $this->node
->id());
$this
->assertFalse($this->generator
->entityTypeIsEnabled('node'));
}