public function testInstallSystem() { global $w2Pconfig; $manager = new UpgradeManager(); switch ($manager->getActionRequired()) { case 'install': $this->assertTrue($manager->testDatabaseCredentials($w2Pconfig)); $errors = $manager->upgradeSystem(); $this->assertEquals(0, count($errors)); $updates = $manager->getUpdatesApplied(); $this->assertGreaterThanOrEqual(5, count($updates)); break; case 'upgrade': $this->assertTrue($manager->testDatabaseCredentials($w2Pconfig)); $errors = $manager->upgradeSystem(); $this->assertEquals(0, count($errors)); $updates = $manager->getUpdatesApplied(); $this->assertGreaterThanOrEqual(0, count($updates)); break; default: $this->fail('UpgradeManager action was not matched.'); } }
You should have received a copy of the GNU General Public License along with dotProject; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA The full text of the GPL is in the COPYING file. */ require_once '../base.php'; require_once W2P_BASE_DIR . '/includes/main_functions.php'; if (version_compare(PHP_VERSION, '5.0', '<')) { echo 'web2Project requires PHP 5.0+. Please upgrade!'; die; } require_once W2P_BASE_DIR . '/install/manager.class.php'; $step = trim(w2PgetCleanParam($_POST, 'step', '')); $manager = new UpgradeManager(); ?> <html> <head> <title>web2Project Update Manager</title> <meta name="Description" content="web2Project Update Manager"> <link rel="stylesheet" type="text/css" href="../style/web2project/main.css" charset="utf-8"/> </head> <body> <table cellspacing="0" cellpadding="3" border="0" class="tbl" width="90%" align="center" style="margin-top: 20px;"> <tr> <td class="item" colspan="2">Welcome to the web2Project Update Manager!</td> </tr> <?php $action = $manager->getActionRequired(); switch ($action) {