diff --git a/modules/simpletest/tests/upgrade/upgrade.d7.test b/modules/simpletest/tests/upgrade/upgrade.d7.test new file mode 100644 index 0000000..eea48c6 --- /dev/null +++ b/modules/simpletest/tests/upgrade/upgrade.d7.test @@ -0,0 +1,183 @@ + 7.x. + */ + +/** + * Boilerplate Upgrade tests for a bare Drupal 7 install from Minimal profile. + */ +class Drupal7MinimalBareUpgradeTest extends UpgradePathTestCase { + public static function getInfo() { + return array( + 'name' => 'Minimal D7 upgrade test', + 'description' => 'Verifies that a bare Drupal 7 minimal installation upgrades gracefully from 7.0 -> 7.x.', + 'group' => 'Upgrade path', + ); + } + + function setUp() { + // Path to the database dump. + $this->databaseDumpFiles = array( + drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-7.bare.minimal.database.php', + ); + parent::setUp(); + } + + /** + * Test a successful upgrade. + */ + function testD7MinimalBareUpgrade() { + $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.')); + // Would now have a list of tests that mark things to look for in the upgrade DB-wise? + } +} + +/** + * Boilerplate Upgrade tests for a Drupal 7 install from Minimal profile with + * content. + */ +class Drupal7MinimalFilledUpgradeTest extends UpgradePathTestCase { + public static function getInfo() { + return array( + 'name' => 'Minimal D7 upgrade test with content', + 'description' => 'Verifies that Drupal 7 minimal install with content upgrades gracefully from 7.0 -> 7.x.', + 'group' => 'Upgrade path', + ); + } + + function setUp() { + // Path to the database dump. + $this->databaseDumpFiles = array( + drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-7.filled.minimal.database.php', + ); + parent::setUp(); + } + + /** + * Test a successful upgrade. + */ + function testD7MinimalFilledUpgrade() { + $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.')); + // Would now have a list of tests that mark things to look for in the upgrade DB-wise? + } +} + +/** + * Boilerplate Upgrade tests for a bare Drupal 7 install from Standard profile. + */ +class Drupal7StandardBareUpgradeTest extends UpgradePathTestCase { + public static function getInfo() { + return array( + 'name' => 'Standard D7 upgrade test', + 'description' => 'Verifies that a bare Drupal 7 standard installation upgrades gracefully from 7.0 -> 7.x.', + 'group' => 'Upgrade path', + ); + } + + function setUp() { + // Path to the database dump. + $this->databaseDumpFiles = array( + drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-7.bare.standard.database.php', + ); + parent::setUp(); + } + + /** + * Test a successful upgrade. + */ + function testD7StandardBareUpgrade() { + $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.')); + // Would now have a list of tests that mark things to look for in the upgrade DB-wise? + } +} + +/** + * Boilerplate Upgrade tests for a Drupal 7 install from Standard profile with + * content. + */ +class Drupal7StandardFilledUpgradeTest extends UpgradePathTestCase { + public static function getInfo() { + return array( + 'name' => 'Standard D7 upgrade test with content', + 'description' => 'Verifies that Drupal 7 standard install with content upgrades gracefully from 7.0 -> 7.x.', + 'group' => 'Upgrade path', + ); + } + + function setUp() { + // Path to the database dump. + $this->databaseDumpFiles = array( + drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-7.filled.standard.database.php', + ); + parent::setUp(); + } + + /** + * Test a successful upgrade. + */ + function testD7StandardFilledUpgrade() { + $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.')); + // Would now have a list of tests that mark things to look for in the upgrade DB-wise? + } +} + +/** + * Boilerplate Upgrade tests for a bare Drupal 7 install from Standard + All. + */ +class Drupal7StandardAllBareUpgradeTest extends UpgradePathTestCase { + public static function getInfo() { + return array( + 'name' => 'Standard + all optional modules D7 upgrade test', + 'description' => 'Verifies that a Standard Drupal 7 installation with all optional core modules upgrades gracefully from 7.0 -> 7.x.', + 'group' => 'Upgrade path', + ); + } + + function setUp() { + // Path to the database dump. + $this->databaseDumpFiles = array( + drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-7.bare.standard.all.database.php', + ); + parent::setUp(); + } + + /** + * Test a successful upgrade. + */ + function testD7StandardAllBareUpgrade() { + $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.')); + // Would now have a list of tests that mark things to look for in the upgrade DB-wise? + } +} + +/** + * Boilerplate Upgrade tests for a Drupal 7 install from Minimal profile with + * content. + */ +class Drupal7StandardAllFilledUpgradeTest extends UpgradePathTestCase { + public static function getInfo() { + return array( + 'name' => 'Minimal D7 upgrade test with content', + 'description' => 'Verifies that a Standard Drupal 7 installation with all optional core modules and content upgrades gracefully from 7.0 -> 7.x.', + 'group' => 'Upgrade path', + ); + } + + function setUp() { + // Path to the database dump. + $this->databaseDumpFiles = array( + drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-7.filled.standard.all.database.php', + ); + parent::setUp(); + } + + /** + * Test a successful upgrade. + */ + function testD7StandardAllFilledUpgrade() { + $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.')); + // Would now have a list of tests that mark things to look for in the upgrade DB-wise? + } +}