diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-06-13 18:27:39 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-06-13 18:27:39 +0000 |
commit | 1ecf2d1326181a2526886221b0abc270133eab2f (patch) | |
tree | 520dfcebf7f3b3906b50a308231dd0d557d30a83 /modules/system/system.test | |
parent | edb84630e824a6a0c89b6594702e574fa6f395ca (diff) | |
download | brdo-1ecf2d1326181a2526886221b0abc270133eab2f.tar.gz brdo-1ecf2d1326181a2526886221b0abc270133eab2f.tar.bz2 |
#808162 by carlos8f, agentrickard: Fixed update.php fails when optional modules disabled.
Diffstat (limited to 'modules/system/system.test')
-rw-r--r-- | modules/system/system.test | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/system/system.test b/modules/system/system.test index b86626453..c3aced017 100644 --- a/modules/system/system.test +++ b/modules/system/system.test @@ -1740,6 +1740,31 @@ class UpdateScriptFunctionalTest extends DrupalWebTestCase { } /** + * Tests the detection of requirements for the update script to proceed. + */ + function testUpdateRequirements() { + $this->drupalLogin($this->update_user); + $this->drupalGet($this->update_url, array('external' => TRUE)); + $this->assertResponse(200); + // Test if disabling a module that another enabled module depends on will + // prevent the update from proceeding. + module_disable(array('block'), FALSE); + $this->assertFalse(module_exists('block'), t('Block module is disabled.')); + $this->assertTrue(module_exists('dashboard'), t('Dashboard module is enabled.')); + $this->drupalGet($this->update_url, array('external' => TRUE)); + $this->assertText(t('Unresolved dependency'), t('The update process cannot proceed when a module dependency is not enabled.')); + + // Test if modules required by the current install profile are not required + // to be enabled for an update to proceed. + module_enable(array('block')); + $this->assertTrue(module_exists('block'), t('Block module is enabled.')); + module_disable(array('overlay')); + $this->assertFalse(module_exists('overlay'), t('Overlay module is disabled.')); + $this->drupalGet($this->update_url, array('external' => TRUE)); + $this->assertNoText(t('Unresolved dependency'), t('The update process can proceed when modules from the install profile are disabled.')); + } + + /** * Tests the effect of using the update script on the theme system. */ function testThemeSystem() { |