public function SimplesitemapTest::testInitialGeneration in Simple XML sitemap 8.3
Same name and namespace in other branches
- 8.2 tests/src/Functional/SimplesitemapTest.php \Drupal\Tests\simple_sitemap\Functional\SimplesitemapTest::testInitialGeneration()
- 4.x tests/src/Functional/SimplesitemapTest.php \Drupal\Tests\simple_sitemap\Functional\SimplesitemapTest::testInitialGeneration()
Verify sitemap.xml has the link to the front page after first generation.
Throws
\Drupal\Component\Plugin\Exception\PluginException
\Behat\Mink\Exception\ExpectationException
File
- tests/
src/ Functional/ SimplesitemapTest.php, line 23
Class
- SimplesitemapTest
- Tests Simple XML Sitemap functional integration.
Namespace
Drupal\Tests\simple_sitemap\FunctionalCode
public function testInitialGeneration() {
$this->generator
->generateSitemap(QueueWorker::GENERATE_TYPE_BACKEND);
$this
->drupalGet($this->defaultSitemapUrl);
$this
->assertSession()
->responseContains('urlset');
$this
->assertSession()
->responseContains(Url::fromRoute('<front>')
->setAbsolute()
->toString());
$this
->assertSession()
->responseContains('1.0');
$this
->assertSession()
->responseContains('daily');
}