public function BasicUpgradePath::testFailedUpgrade

7.x upgrade.test public BasicUpgradePath::testFailedUpgrade()

Test a failed upgrade, and verify that the failure is reported.

File

drupal/modules/simpletest/tests/upgrade/upgrade.test, line 357

Class

BasicUpgradePath
Perform basic upgrade tests.

Code

public function testFailedUpgrade() {
  // Destroy a table that the upgrade process needs.
  db_drop_table('access');
  // Assert that the upgrade fails.
  $this->assertFalse($this->performUpgrade(FALSE) && $this->pendingUpdates, 'A failed upgrade should return messages.');
}