public function testBasicConnection() { $pool = new \phpOMS\DataStorage\Database\Pool(); $pool->create('core', $GLOBALS['CONFIG']['db']); $this->assertEquals($pool->get('core')->status, \phpOMS\DataStorage\Database\DatabaseStatus::OK); $pool->get('core')->close(); $this->assertEquals($pool->get('core')->status, \phpOMS\DataStorage\Database\DatabaseStatus::CLOSED); $pool->get('core')->connect($GLOBALS['CONFIG']['db']); $this->assertEquals($pool->get('core')->status, \phpOMS\DataStorage\Database\DatabaseStatus::OK); }
<?php error_reporting(E_ALL); ini_set('display_errors', 1); require_once __DIR__ . '/../../config.php'; require_once __DIR__ . '/../../phpOMS/Autoloader.php'; $dbHOBJ = new \phpOMS\DataStorage\Database\Pool(); $dbHOBJ->create('core', $CONFIG['db']); $instHOBJ = new \Admin\Install\Install($dbHOBJ); /** * Array with all modules to install * * @var array toInstall */ $toInstall = ['Admin', 'Business', 'Calendar', 'Chat', 'Clocking', 'Content', 'Controlling', 'Dashboard', 'EmployeeEvaluation', 'EmployeeManagement', 'EventManagement', 'HumanResourceManagement', 'Media', 'Messages', 'Monitoring', 'MyPrivate', 'Navigation', 'News', 'PersonnelTimeManagement', 'Profile', 'ProjectManagement', 'Reporter', 'RiskManagement', 'Support', 'Surveys', 'Tasks', 'Tools', 'TravelExpenses']; $instHOBJ->installCore(); $instHOBJ->installModules($toInstall); $instHOBJ->installGroups(); $instHOBJ->installUsers(); /* TODO: create user 1 = Guest -> 2 = Admin */ $instHOBJ->installSettings(); $toDummy = []; //$instHOBJ->installDummy($toDummy); echo 'ALPHA successfully installed!';