Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Upgrade test for the bare database..
- *
- * Load an empty installation of Drupal 7 and run the upgrade process on it.
- */
- class BareUpgradePathTestCase extends UpgradePathTestCase {
- public static function getInfo() {
- return array(
- 'name' => 'Bare upgrade test',
- 'description' => 'Bare upgrade test.',
- 'group' => 'Upgrade path',
- );
- }
- public function checkRequirements() {
- if (!function_exists('gzopen')) {
- return array(
- 'errors' => array(
- t('The zlib extension is not enabled. As a result, this test cannot run.'),
- ),
- );
- }
- return parent::checkRequirements();
- }
- public function setUp() {
- // Path to the database dump.
- $this->databaseDumpFiles = array(
- drupal_get_path('module', 'simpletest') . '/tests/upgrade/drupal-7.bare.database.php.gz',
- );
- parent::setUp();
- }
- /**
- * Test a successful upgrade.
- */
- public function testBareUpgrade() {
- $this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement