Commit c75da70c authored by gbyte.co's avatar gbyte.co

Test initial sitemap generation in SimplesitemapTest

parent 50567261
......@@ -40,13 +40,14 @@ class SimplesitemapTest extends WebTestBase {
* Test Simple sitemap integration.
*/
public function testSimplesitemap() {
\Drupal::service('simple_sitemap.generator')->generateSitemap('nobatch');
// Verify sitemap.xml can be cached.
// Verify sitemap.xml has been generated on install (custom path generation).
$this->drupalGet('sitemap.xml');
$this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS');
$this->assertText('http://');
$this->drupalGet('sitemap.xml');
$this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT');
$this->assertText('http://');
/* @var $node \Drupal\Node\NodeInterface */
$node = $this->createNode(['title' => 'A new page', 'type' => 'page']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment