You are here

public function SimpleSitemapViewsTest::testSitemapSupportForViews in Simple XML sitemap 4.x

Same name and namespace in other branches
  1. 8.3 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 17

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());
}