Commit 528b71da authored by Dave Reid's avatar Dave Reid
Browse files

by Dave Reid: Fixed straggling test updates.

parent c1d35966
...@@ -167,7 +167,7 @@ function xmlsitemap_install() { ...@@ -167,7 +167,7 @@ function xmlsitemap_install() {
// Insert the homepage link into the {xmlsitemap} table so we do not show an // Insert the homepage link into the {xmlsitemap} table so we do not show an
// empty sitemap after install. // empty sitemap after install.
db_query("INSERT INTO {xmlsitemap} (type, id, loc, priority, changefreq, language) VALUES ('frontpage', 0, '', :priority, :changefreq, :language)", array(':priority' => xmlsitemap_var('frontpage_priority'), 'changefreq' => xmlsitemap_var('frontpage_changefreq'), ':language' => LANGUAGE_NONE)); db_query("INSERT INTO {xmlsitemap} (type, id, loc, priority, changefreq, language) VALUES ('frontpage', 0, '', :priority, :changefreq, :language)", array(':priority' => variable_get('xmlsitemap_frontpage_priority', 1.0), 'changefreq' => variable_get('xmlsitemap_frontpage_changefreq', 86400), ':language' => LANGUAGE_NONE));
// @todo Does the sitemap show up on first install or is it a 404 page? // @todo Does the sitemap show up on first install or is it a 404 page?
} }
......
...@@ -202,7 +202,7 @@ function xmlsitemap_node_get_timestamps($node) { ...@@ -202,7 +202,7 @@ function xmlsitemap_node_get_timestamps($node) {
* @param $node * @param $node
* A node object. * A node object.
*/ */
function xmlsitemap_node_create_link(&$node) { function xmlsitemap_node_create_link(stdClass &$node) {
if (!isset($node->xmlsitemap) || !is_array($node->xmlsitemap)) { if (!isset($node->xmlsitemap) || !is_array($node->xmlsitemap)) {
$node->xmlsitemap = array(); $node->xmlsitemap = array();
if ($node->nid && $link = xmlsitemap_link_load('node', $node->nid)) { if ($node->nid && $link = xmlsitemap_link_load('node', $node->nid)) {
......
...@@ -157,7 +157,7 @@ function xmlsitemap_taxonomy_field_extra_fields() { ...@@ -157,7 +157,7 @@ function xmlsitemap_taxonomy_field_extra_fields() {
* @return * @return
* An array representing a sitemap link. * An array representing a sitemap link.
*/ */
function xmlsitemap_taxonomy_create_link(stdClass $term) { function xmlsitemap_taxonomy_create_link(stdClass &$term) {
if (!isset($term->xmlsitemap)) { if (!isset($term->xmlsitemap)) {
$term->xmlsitemap = array(); $term->xmlsitemap = array();
if ($term->tid && $link = xmlsitemap_link_load('taxonomy_term', $term->tid)) { if ($term->tid && $link = xmlsitemap_link_load('taxonomy_term', $term->tid)) {
......
...@@ -28,9 +28,7 @@ class XMLSitemapUserFunctionalTest extends XMLSitemapTestHelper { ...@@ -28,9 +28,7 @@ class XMLSitemapUserFunctionalTest extends XMLSitemapTestHelper {
function testBlockedUser() { function testBlockedUser() {
$this->drupalLogin($this->admin_user); $this->drupalLogin($this->admin_user);
$this->assertSitemapLinkVisible('user', $this->normal_user->uid);
$account = $this->drupalCreateUser();
$this->assertSitemapLinkVisible('user', $account->uid);
// Mark the user as blocked. // Mark the user as blocked.
$edit = array( $edit = array(
...@@ -38,8 +36,8 @@ class XMLSitemapUserFunctionalTest extends XMLSitemapTestHelper { ...@@ -38,8 +36,8 @@ class XMLSitemapUserFunctionalTest extends XMLSitemapTestHelper {
); );
// This will pass when http://drupal.org/node/360925 is fixed. // This will pass when http://drupal.org/node/360925 is fixed.
$this->drupalPost('user/' . $account->uid . '/edit', $edit, t('Save')); $this->drupalPost('user/' . $this->normal_user->uid . '/edit', $edit, t('Save'));
$this->assertText(t('The changes have been saved.')); $this->assertText('The changes have been saved.');
$this->assertSitemapLinkNotVisible('user', $account->uid); $this->assertSitemapLinkNotVisible('user', $this->normal_user->uid);
} }
} }
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