Commit 0b2bcf96 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Add a check: phpUnit Tests are not prepared ofr Multi DB tests

parent 5b636287
......@@ -84,6 +84,13 @@ abstract class AbstractDatabaseTest extends PHPUnit_Framework_TestCase {
$this->store->setVar('DB_1_NAME', $dbName, STORE_SYSTEM);
$dbIndexData = $this->store->getVar(SYSTEM_DB_INDEX_DATA, STORE_SYSTEM);
$dbIndexQfq = $this->store->getVar(SYSTEM_DB_INDEX_QFQ, STORE_SYSTEM);
if ($dbIndexData != $dbIndexQfq) {
throw new \qfq\CodeException('phpUnit Tests are not prepared for MultiDB tests');
if (empty($this->dbArray)) {
$this->dbArray[DB_INDEX_DATA_DEFAULT] = new qfq\Database();
......@@ -521,6 +521,7 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
// Use always the latest (production) FormEditor: played during QuickFormQuery()
$this->dbArray[DB_INDEX_DATA_DEFAULT]->sql("DROP TABLE IF EXISTS `Form`");
$this->dbArray[DB_INDEX_DATA_DEFAULT]->sql("DROP TABLE IF EXISTS `FormElement`");
Supports Markdown
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