public function XMLSitemapRobotsTxtIntegrationTest::testRobotsTxt in XML sitemap 7.2
Same name and namespace in other branches
- 6.2 xmlsitemap.test \XMLSitemapRobotsTxtIntegrationTest::testRobotsTxt()
Test Robots Txt.
File
- ./
xmlsitemap.test, line 1007 - Unit tests for the xmlsitemap.
Class
- XMLSitemapRobotsTxtIntegrationTest
- XML Sitemap Robots Txt Integration Test.
Code
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
->assertRaw('Sitemap: ' . url('sitemap.xml', array(
'absolute' => TRUE,
)));
}