public function XMLSitemapFunctionalTest::testStatusReport in XML sitemap 7.2
Same name and namespace in other branches
- 6.2 xmlsitemap.test \XMLSitemapFunctionalTest::testStatusReport()
Test Status Report Function.
Test that configuration problems are reported properly in the status report.
File
- ./
xmlsitemap.test, line 953 - Unit tests for the xmlsitemap.
Class
- XMLSitemapFunctionalTest
- XML Sitemap Functional Test.
Code
public function testStatusReport() {
// Test the rebuild flag.
// @codingStandardsIgnoreStart
// @todo Re-enable these tests once we get a xmlsitemap_test.module.
// variable_set('xmlsitemap_generated_last', REQUEST_TIME);
// variable_set('xmlsitemap_rebuild_needed', TRUE);
// $this->assertXMLSitemapProblems(t('The XML sitemap data is out of sync and needs to be completely rebuilt.'));
// $this->clickLink(t('completely rebuilt'));
// $this->assertResponse(200);
// variable_set('xmlsitemap_rebuild_needed', FALSE);
// $this->assertNoXMLSitemapProblems();
// Test the regenerate flag (and cron hasn't run in a while).
// @codingStandardsIgnoreEnd
variable_set('xmlsitemap_regenerate_needed', TRUE);
variable_set('xmlsitemap_generated_last', REQUEST_TIME - variable_get('cron_threshold_warning', 172800) - 100);
$this
->assertXMLSitemapProblems(t('The XML cached files are out of date and need to be regenerated. You can run cron manually to regenerate the sitemap files.'));
$this
->clickLink(t('run cron manually'));
$this
->assertResponse(200);
$this
->assertNoXMLSitemapProblems();
// Test chunk count > 1000.
// Test directory not writable.
}