コード例 #1
0
 public function testInstallSystem()
 {
     global $w2Pconfig;
     $manager = new w2p_Core_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('w2p_Core_UpgradeManager action was not matched.');
     }
 }
コード例 #2
0
ファイル: index.php プロジェクト: viniciusbudines/sisnuss
<?php

require_once '../base.php';
require_once W2P_BASE_DIR . '/includes/main_functions.php';
if (version_compare(PHP_VERSION, MIN_PHP_VERSION, '<')) {
    echo 'web2Project requires PHP ' . MIN_PHP_VERSION . '+. Please upgrade!';
    die;
}
$step = trim(w2PgetCleanParam($_POST, 'step', ''));
$manager = new w2p_Core_UpgradeManager();
?>
<html>
	<head>
		<title>web2Project Update Manager</title>
		<meta name="Description" content="web2Project Update Manager">
        <link rel="stylesheet" type="text/css" href="../style/common.css" media="all" charset="utf-8"/>
	 	<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