Commit 7e899523 authored by Dave Reid's avatar Dave Reid

by Dave Reid: Fixed test failures.

parent 1494e867
......@@ -98,6 +98,8 @@ function xmlsitemap_help($path, $arg) {
switch ($path) {
case 'admin/help/xmlsitemap':
case 'admin/config/search/xmlsitemap/settings/%/%/%':
case 'admin/config/search/xmlsitemap/edit/%':
case 'admin/config/search/xmlsitemap/delete/%':
return;
case 'admin/help#xmlsitemap':
break;
......@@ -619,7 +621,7 @@ function xmlsitemap_link_load_multiple(array $conditions = array()) {
function xmlsitemap_save_link(array $link) {
$link += array(
'access' => 1,
'status' => XMLSITEMAP_STATUS_DEFAULT,
'status' => 1,
'status_override' => 0,
'lastmod' => 0,
'priority' => XMLSITEMAP_PRIORITY_DEFAULT,
......
......@@ -618,7 +618,7 @@ class XMLSitemapFunctionalTest extends XMLSitemapTestHelper {
$this->regenerateSitemap();
$edit = array('xmlsitemap_minimum_lifetime' => 300);
$this->drupalPost('admin/config/search/xmlsitemap', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap/settings', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'));
$link = $this->addSitemapLink(array('loc' => 'lifetime-test'));
......@@ -627,12 +627,12 @@ class XMLSitemapFunctionalTest extends XMLSitemapTestHelper {
$this->assertNoRaw('lifetime-test');
variable_set('xmlsitemap_generated_last', REQUEST_TIME - 300);
drupal_cron_run();
$this->cronRun();
$this->drupalGetSitemap();
$this->assertRaw('lifetime-test');
xmlsitemap_link_delete($link['type'], $link['id']);
drupal_cron_run();
$this->cronRun();
$this->drupalGetSitemap();
$this->assertRaw('lifetime-test');
......@@ -645,19 +645,19 @@ class XMLSitemapFunctionalTest extends XMLSitemapTestHelper {
*/
function testBaseURL() {
$edit = array('xmlsitemap_base_url' => '');
$this->drupalPost('admin/config/search/xmlsitemap', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap/settings', $edit, t('Save configuration'));
$this->assertText(t('Base URL field is required.'));
$edit = array('xmlsitemap_base_url' => 'invalid');
$this->drupalPost('admin/config/search/xmlsitemap', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap/settings', $edit, t('Save configuration'));
$this->assertText(t('Invalid base URL.'));
$edit = array('xmlsitemap_base_url' => 'http://example.com/ ');
$this->drupalPost('admin/config/search/xmlsitemap', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap/settings', $edit, t('Save configuration'));
$this->assertText(t('Invalid base URL.'));
$edit = array('xmlsitemap_base_url' => 'http://example.com/');
$this->drupalPost('admin/config/search/xmlsitemap', $edit, t('Save configuration'));
$this->drupalPost('admin/config/search/xmlsitemap/settings', $edit, t('Save configuration'));
$this->assertText(t('The configuration options have been saved.'));
$this->drupalGetSitemap(LANGUAGE_NONE, TRUE);
......
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