diff options
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r-- | modules/simpletest/tests/upgrade/upgrade.node.test | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/simpletest/tests/upgrade/upgrade.node.test b/modules/simpletest/tests/upgrade/upgrade.node.test index f5cb3dffb..08617a956 100644 --- a/modules/simpletest/tests/upgrade/upgrade.node.test +++ b/modules/simpletest/tests/upgrade/upgrade.node.test @@ -26,10 +26,19 @@ class NodeBodyUpgradePathTestCase extends UpgradePathTestCase { /** * Test a successful upgrade. */ - public function testNodyBodyUpgrade() { + public function testNodeBodyUpgrade() { $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.')); $this->drupalGet("content/1263769200"); $this->assertText('node body (broken) - 37'); + + // Find a published node revision and make sure it still has a body. + $revision = db_query_range("SELECT r.nid, r.vid FROM {node_revision} r JOIN {node} n ON n.nid = r.nid WHERE n.status = 1 AND n.type <> 'poll' AND n.vid <> r.vid", 0, 1)->fetch(); + $revision = node_load($revision->nid, $revision->vid); + $this->assertTrue(!empty($revision->body), 'Non-current node revisions still have a node body.'); + // Find an unpublished node revision and make sure it still has a body. + $revision = db_query_range("SELECT r.nid, r.vid FROM {node_revision} r JOIN {node} n ON n.nid = r.nid WHERE n.status = 0 AND n.type <> 'poll' AND n.vid <> r.vid", 0, 1)->fetch(); + $revision = node_load($revision->nid, $revision->vid); + $this->assertTrue(!empty($revision->body), 'Unpublished non-current node revisions still have a node body.'); } } |