Commit 183d8780 authored by webchick's avatar webchick

#261258 follow-up by dbabbage: Fixed some missed node title changes that were breaking testbot.

parent 85213d3b
......@@ -976,8 +976,8 @@ function node_save($node) {
unset($node->log);
}
// When saving a new node revision, unset any existing revision ID so as to
// ensure that a new revision will actually be created, and store the old
// When saving a new node revision, unset any existing $node->vid so as to
// ensure that a new revision will actually be created, then store the old
// revision ID in a separate property for use by node hook implementations.
if (!$node->is_new && !empty($node->revision) && $node->vid) {
$node->old_vid = $node->vid;
......
......@@ -181,8 +181,7 @@ class NodeRevisionsTestCase extends DrupalWebTestCase {
'vid' => $node->vid,
'uid' => $node->uid,
'type' => $node->type,
'title' => array(LANGUAGE_NONE => array(array('value' => $new_title))),
'log' => '',
'title' => $new_title,
);
node_save($updated_node);
$this->drupalGet('node/' . $node->nid);
......@@ -201,14 +200,14 @@ class NodeRevisionsTestCase extends DrupalWebTestCase {
'vid' => $node->vid,
'uid' => $node->uid,
'type' => $node->type,
'title' => array(LANGUAGE_NONE => array(array('value' => $new_title))),
'title' => $new_title,
'revision' => 1,
);
node_save($updated_node);
$this->drupalGet('node/' . $node->nid);
$this->assertText($new_title, t('New node title appears on the page.'));
$this->assertText($new_title, 'New node title appears on the page.');
$node_revision = node_load($node->nid, NULL, TRUE);
$this->assertTrue(empty($node_revision->log), t('After a new node revision is saved with an empty log message, the log message for the node is empty.'));
$this->assertTrue(empty($node_revision->log), 'After a new node revision is saved with an empty log message, the log message for the node is empty.');
}
}
......
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