$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.'));
return$this->assertFalse($match,$message?$message:t('HTTP response not expected !code, actual !curl_code',array('!code'=>$code,'!curl_code'=>$curl_code)),t('Browser'));
...
...
@@ -85,11 +84,11 @@ abstract class XmlSitemapTestBase extends WebTestBase {
* Regenerate the sitemap by setting the regenerate flag and running cron.
$this->assertTrue(\Drupal::config('xmlsitemap.settings')->get('generated_last')&&!\Drupal::config('xmlsitemap.settings')->get('regenerate_needed'),t('XML sitemaps regenerated and flag cleared.'));
$this->assertTrue(\Drupal::config('xmlsitemap.settings')->get('generated_last')&&!\Drupal::state()->get('regenerate_needed'),t('XML sitemaps regenerated and flag cleared.'));
@@ -140,7 +139,7 @@ abstract class XmlSitemapTestBase extends WebTestBase {
}
else{
// Otherwise check simple equality (==).
$this->assertEqual($link[$key],$value,t('Equal values for @type @id link field @key - @a - @b.',array('@type'=>$entity_type,'@id'=>$entity_id,'@key'=>$key,'@a'=>$link[$key],'@b'=>$value)));
$this->assertEqual($link[$key],$value,t('Equal values for @type @id link field @key - @a - @b.',array('@type'=>$entity_type,'@id'=>$entity_id,'@key'=>$key,'@a'=>$link[$key],'@b'=>$value)));
}
}
}
...
...
@@ -202,7 +201,13 @@ abstract class XmlSitemapTestBase extends WebTestBase {
$existing=db_query_range("SELECT loc, access, status, lastmod, priority, changefreq, changecount, language FROM {xmlsitemap} WHERE type = :type AND id = :id",0,1,array(':type'=>$link['type'],':id'=>$link['id']))->fetchAssoc();
// Check if this is a changed link and set the regenerate flag if necessary.
@@ -123,11 +123,11 @@ function xmlsitemap_requirements($phase) {
'value'=>$generated_last?$t('Last attempted generation on !date (!interval ago).',array('!date'=>format_date($generated_last,'small'),'!interval'=>format_interval($generated_ago))):$t('Cached files have not been generated yet.'),
$requirements['xmlsitemap_generated']['description']=$t('The XML sitemap data is out of sync and needs to be <a href="@link-rebuild">completely rebuilt<a>.',array('@link-rebuild'=>url('admin/config/search/xmlsitemap/rebuild')));
@@ -521,7 +535,7 @@ function xmlsitemap_link_save(array $link) {
$existing=db_query_range("SELECT loc, access, status, lastmod, priority, changefreq, changecount, language FROM {xmlsitemap} WHERE type = :type AND id = :id",0,1,array(':type'=>$link['type'],':id'=>$link['id']))->fetchAssoc();
// Check if this is a changed link and set the regenerate flag if necessary.
drupal_set_message(t('XML sitemap settings have been modified and the files should be regenerated. You can <a href="@run-cron">run cron manually</a> to regenerate the cached files.',array('@run-cron'=>url('admin/reports/status/run-cron',array('query'=>drupal_get_destination())))),'warning',FALSE);