From 440ee692b8f250bcd02f262df9614913ae65d86e Mon Sep 17 00:00:00 2001 From: Seamus Lee <seamuslee001@gmail.com> Date: Wed, 22 Jul 2020 10:13:08 +1000 Subject: [PATCH] Fix test failures --- CRM/Utils/Check/Component/Env.php | 3 ++- Civi/Test/Data.php | 2 ++ sql/test_data_second_domain.mysql | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/Check/Component/Env.php b/CRM/Utils/Check/Component/Env.php index 1f63ec83e7d..f239f69d526 100644 --- a/CRM/Utils/Check/Component/Env.php +++ b/CRM/Utils/Check/Component/Env.php @@ -751,7 +751,8 @@ class CRM_Utils_Check_Component_Env extends CRM_Utils_Check_Component { } // if db.ver > code.ver, sth really wrong - if (version_compare($dbVersion, CRM_Utils_System::version()) > 0) { + $codeVersion = CRM_Utils_System::version(); + if (version_compare($dbVersion, $codeVersion) > 0) { $messages[] = new CRM_Utils_Check_Message( __FUNCTION__, ts('Your database is marked with an unexpected version number: %1. The v%2 codebase may not be compatible with your database state. diff --git a/Civi/Test/Data.php b/Civi/Test/Data.php index 8cada62629b..eb4a5ef0831 100644 --- a/Civi/Test/Data.php +++ b/Civi/Test/Data.php @@ -44,6 +44,8 @@ class Data { \Civi\Test::schema()->setStrict(TRUE); }); + civicrm_api('setting', 'create', ['installed' => 1, 'domain_id' => 'all', 'version' => 3]); + // Rebuild triggers civicrm_api('system', 'flush', ['version' => 3, 'triggers' => 1]); diff --git a/sql/test_data_second_domain.mysql b/sql/test_data_second_domain.mysql index a0cf296334f..9d78b106066 100644 --- a/sql/test_data_second_domain.mysql +++ b/sql/test_data_second_domain.mysql @@ -963,4 +963,4 @@ INSERT INTO civicrm_navigation VALUES ( @domainID, CONCAT('civicrm/report/instance/', @instanceID,'&reset=1'), 'Mailing Detail Report', 'Mailing Detail Report', 'administer CiviMail', 'OR', @reportlastID, '1', NULL, @instanceID+2 ); UPDATE civicrm_report_instance SET navigation_id = LAST_INSERT_ID() WHERE id = @instanceID; -UPDATE civicrm_domain SET version = '5.28.alpha1'; +UPDATE civicrm_domain SET version = '5.27.2'; -- GitLab