public function testNotEnoughAvailableFileSpace()
 {
     // More disk space than is available
     AppUpgraderDiskUtil::$DISK_SPACE_NEEDED = disk_free_space(dirname(__FILE__)) + 1024 * 1024 * 10;
     $upgrade_controller = new UpgradeApplicationController(true);
     try {
         $upgrade_controller->runUpdate($this->test_web_dir);
         $this->fail("Should throw an exception...");
     } catch (Exception $e) {
         $this->assertPattern('/There is not enough free disk space to perform an update/', $e->getMessage());
     }
     AppUpgraderDiskUtil::$DISK_SPACE_NEEDED = 104857600;
     // set back to 100 MB
 }
 /**
  * Set the amount of disk space needed in bytes.
  * @param $bytes
  */
 public function setDiskSpaceNeeded($bytes)
 {
     self::$DISK_SPACE_NEEDED = $bytes;
 }