Commit bd213b63 authored by Carsten  Rose's avatar Carsten Rose

Fixed problem in DB Credentials for phpunit test

parent 5772db6c
......@@ -71,12 +71,18 @@ abstract class AbstractDatabaseTest extends PHPUnit_Framework_TestCase {
$this->sip->sipUniqId('badcaffee1234');
// SWITCH to TestDB
$dbNamePhpUnit = $this->store->getVar('dbNamePhpUnit', STORE_SYSTEM . STORE_EMPTY);
if ($dbNamePhpUnit == '') {
$dbNamePhpUnit = $this->store->getVar('DB_1_NAME', STORE_SYSTEM) . '_phpunit';
$this->store->setVar('dbNamePhpUnit', $dbNamePhpUnit, STORE_SYSTEM);
// $dbNamePhpUnit = $this->store->getVar('dbNamePhpUnit', STORE_SYSTEM . STORE_EMPTY);
// if ($dbNamePhpUnit == '') {
// $dbNamePhpUnit = $this->store->getVar('DB_1_NAME', STORE_SYSTEM) . '_phpunit';
// $this->store->setVar('dbNamePhpUnit', $dbNamePhpUnit, STORE_SYSTEM);
// }
// $this->store->setVar('DB_1_NAME', $dbNamePhpUnit, STORE_SYSTEM);
$dbName = $this->store->getVar('DB_NAME_TEST', STORE_SYSTEM);
if ($dbName == '') {
throw new \qfq\CodeException('Missing DB_NAME_TEST in ' . CONFIG_INI, ERROR_MISSING_REQUIRED_PARAMETER);
} else {
$this->store->setVar('DB_1_NAME', $dbName, STORE_SYSTEM);
}
$this->store->setVar('DB_1_NAME', $dbNamePhpUnit, STORE_SYSTEM);
if (empty($this->dbArray)) {
$this->dbArray[DB_INDEX_DATA_DEFAULT] = new qfq\Database();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment