Commit 437940a1 authored by andrei.dincu's avatar andrei.dincu
Browse files

Issue #2249723 by andrei.dincu: XmlSitemapRobotsTxtIntegrationTest pass all tests

parent d258f15d
......@@ -27,13 +27,26 @@ class XmlSitemapRobotsTxtIntegrationTest extends XmlSitemapTestHelper {
public function setUp() {
parent::setUp();
if (file_exists('robots.txt')) {
file_unmanaged_move('robots.txt','robots_temp.txt');
}
}
public function testRobotsTxt() {
// Request the un-clean robots.txt path so this will work in case there is
// still the robots.txt file in the root directory.
$this->drupalGet('', array('query' => array('q' => 'robots.txt')));
//$this->drupalGet('', array('query' => array('q' => 'robots.txt')));
$this->drupalGet('/robots.txt');
$this->assertRaw('Sitemap: ' . url('sitemap.xml', array('absolute' => TRUE)));
}
public function tearDown() {
parent::tearDown();
if (file_exists('robots_temp.txt')) {
file_unmanaged_move('robots_temp.txt', 'robots.txt');
}
}
}
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