Commit 704c728e authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fix unit test.

parent 67951ee2
Pipeline #1958 passed with stages
in 2 minutes and 46 seconds
......@@ -125,16 +125,16 @@ class DatabaseUpdate {
if ($dbUpdate === SYSTEM_DB_UPDATE_NEVER) {
return;
}
$old = false;
$new = $this->getExtensionVersion();
$versionInfo = $this->getDatabaseVersion();
$old = $versionInfo[QFQ_VERSION_KEY] ?? '';
$old = $versionInfo[QFQ_VERSION_KEY] ?? false;
if ($dbUpdate === SYSTEM_DB_UPDATE_ALWAYS || ($dbUpdate === SYSTEM_DB_UPDATE_AUTO && $new != $old)) {
$newFunctionsHash = $this->updateSqlFunctions($versionInfo[QFQ_VERSION_KEY_FUNCTION_HASH] ?? '');
if (null !== $newFunctionsHash) {
$versionInfo[QFQ_VERSION_KEY_FUNCTION_HASH] = $newFunctionsHash;
$newFunctionHash = $this->updateSqlFunctions($versionInfo[QFQ_VERSION_KEY_FUNCTION_HASH] ?? '');
if (null !== $newFunctionHash) {
$versionInfo[QFQ_VERSION_KEY_FUNCTION_HASH] = $newFunctionHash;
$versionInfo[QFQ_VERSION_KEY_FUNCTION_VERSION] = $new;
}
......
......@@ -29,7 +29,8 @@ class DatabaseUpdateTest extends AbstractDatabaseTest {
*/
public function testCheckNupdate() {
$countQfqTables = 8;
// $countQfqTables = 8;
$countQfqTables = 9;
$dbUpdate = new DatabaseUpdate($this->dbArray[DB_INDEX_DEFAULT]);
......
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