Example #1
0
 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.');
     }
 }
Example #2
0
$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) {
    case 'install':
        ?>
					<tr>
						<td colspan="2">This system will help you perform each of the 
							required steps to prepare your web2project installation.  It's 
							a three step process.  First we'll confirm that all the 
							requirements are met, then we'll get the database credentials, 
							then we'll load the system.</td>
					</tr>
					<?php 
        if ($step == '') {
            ?>
						<tr>
							<td colspan="2">