Commit 5833ff01 authored by gbyte.co's avatar gbyte.co

Add functional base_url functionality tests

parent 4136ffa7
......@@ -189,6 +189,31 @@ class SimplesitemapTest extends WebTestBase {
$this->assertText('0.5');
}
/**
* Test setting the base URL.
*/
public function testSetBaseUrl() {
$this->generator->setBundleSettings('node', 'page', ['index' => TRUE, 'priority' => 0.5])
->saveSetting('base_url', 'http://base_url_test')
->generateSitemap('nobatch');
$this->drupalGet('sitemap.xml');
$this->assertText('http://base_url_test');
}
/**
* Test setting the base URL in the sitemap index.
*/
public function testSetBaseUrlInSitemapIndex() {
$this->generator->setBundleSettings('node', 'page', ['index' => TRUE, 'priority' => 0.5])
->saveSetting('max_links', 1)
->saveSetting('base_url', 'http://base_url_test')
->generateSitemap('nobatch');
$this->drupalGet('sitemap.xml');
$this->assertText('http://base_url_test');
}
/**
* Test adding a custom link to the sitemap.
*/
......
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