diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-01-21 10:18:14 -0800 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-01-21 10:18:14 -0800 |
commit | 4ef9f0598ba00a639a937851738e0748fbfbb18f (patch) | |
tree | e4d6323c50cdf95ed79ef21751f6485d4123cd70 | |
parent | 5f3834f2acef803cff80a060fa2863115c965b99 (diff) | |
download | brdo-4ef9f0598ba00a639a937851738e0748fbfbb18f.tar.gz brdo-4ef9f0598ba00a639a937851738e0748fbfbb18f.tar.bz2 |
Issue #1160928 by catch, xjm: Add tests for node type/comment body upgrade path.
-rw-r--r-- | modules/simpletest/tests/upgrade/upgrade.node.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/modules/simpletest/tests/upgrade/upgrade.node.test b/modules/simpletest/tests/upgrade/upgrade.node.test index cd44790c7..b49a40b0d 100644 --- a/modules/simpletest/tests/upgrade/upgrade.node.test +++ b/modules/simpletest/tests/upgrade/upgrade.node.test @@ -51,6 +51,38 @@ class NodeBodyUpgradePathTestCase extends UpgradePathTestCase { } /** + * Tests the upgrade path for node disabled node types. + * + * Load a filled installation of Drupal 6 and run the upgrade process on it. + */ +class DisabledNodeTypeTestCase extends UpgradePathTestCase { + public static function getInfo() { + return array( + 'name' => 'Disabled node type upgrade path', + 'description' => 'Disabled node type upgrade path tests.', + 'group' => 'Upgrade path', + ); + } + + public function setUp() { + // Path to the database dump. + $this->databaseDumpFiles = array( + drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-6.filled.database.php', + drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-6.node_type_broken.database.php', + ); + parent::setUp(); + } + + /** + * Tests a successful upgrade. + */ + public function testDisabledNodeTypeUpgrade() { + $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.')); + $this->assertTrue(field_info_instance('comment', 'comment_body', 'comment_node_broken'), 'Comment body field instance was created for comments attached to the disabled broken node type'); + } +} + +/** * Upgrade test for node type poll. * * Load a bare installation of Drupal 6 and run the upgrade process on it. |