You are here

public function SimpleSitemapViewsTest::testSitemapSupportForViews in Simple XML sitemap 8.3

Same name and namespace in other branches
  1. 4.x modules/simple_sitemap_views/tests/src/Functional/SimpleSitemapViewsTest.php \Drupal\Tests\simple_sitemap_views\Functional\SimpleSitemapViewsTest::testSitemapSupportForViews()

Tests status of sitemap support for views.

File

modules/simple_sitemap_views/tests/src/Functional/SimpleSitemapViewsTest.php, line 15

Class

SimpleSitemapViewsTest
Tests Simple XML Sitemap (Views) functional integration.

Namespace

Drupal\Tests\simple_sitemap_views\Functional

Code

public function testSitemapSupportForViews() {

  // Views support must be enabled after module installation.
  $this
    ->assertTrue($this->sitemapViews
    ->isEnabled());
  $this->sitemapViews
    ->disable();
  $this
    ->assertFalse($this->sitemapViews
    ->isEnabled());
  $this->sitemapViews
    ->enable();
  $this
    ->assertTrue($this->sitemapViews
    ->isEnabled());
}