Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ginatrapani committed Mar 15, 2012
1 parent 0e93f7f commit c88e122
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/TestOfUpgradeApplicationController.php
Expand Up @@ -79,6 +79,7 @@ public function testReadyToUpdate() {
}

public function testRunUpdate() {
$config = Config::getInstance();
$this->simulateLogin('me@example.com', true);
$_GET['run_update'] = true;
$controller = new MockUpgradeApplicationController(true);
Expand All @@ -89,7 +90,8 @@ public function testRunUpdate() {
$controller = new MockUpgradeApplicationController(true);
MockUpgradeApplicationController::$current_exception = false;
$results = $controller->go();
$this->assertEqual($controller->redirect_destination, '/install/upgrade-application.php?ran_update=1');
$this->assertEqual($controller->redirect_destination, $config->getValue('site_root_path').
'install/upgrade-application.php?ran_update=1');
}

public function testRanUpdate() {
Expand All @@ -112,7 +114,7 @@ public function testAvailableFileSpace() {
}

public function testNotEnoughAvailableFileSpace() {
AppUpgraderDiskUtil::$DISK_SPACE_NEEDED = 107374182400 * 1024 * 10 ; // 10,000 megs
AppUpgraderDiskUtil::$DISK_SPACE_NEEDED = 107374182400 * 1024 * 100000 ; // a LOT of disk space
$upgrade_controller = new UpgradeApplicationController(true);
try {
$upgrade_controller->runUpdate();
Expand Down

0 comments on commit c88e122

Please sign in to comment.