* Ex: $stringTable['enabled']['wildcardMatch']['foo'] = 'bar';
*/
private function getWordReplacements() {
- if (isset(Civi::$statics['testPreInstall'])) {
+ if (isset(Civi\Test::$statics['testPreInstall'])) {
return [];
}
$conn = \Civi\Test::pdo();
$oldEscaper = \CRM_Core_I18n::$SQL_ESCAPER;
- \Civi::$statics['testPreInstall'] = (\Civi::$statics['testPreInstall'] ?? 0) + 1;
+ \Civi\Test::$statics['testPreInstall'] = (\Civi\Test::$statics['testPreInstall'] ?? 0) + 1;
try {
\CRM_Core_I18n::$SQL_ESCAPER = function ($text) use ($conn) {
return substr($conn->quote($text), 1, -1);
return $callback();
} finally {
\CRM_Core_I18n::$SQL_ESCAPER = $oldEscaper;
- \Civi::$statics['testPreInstall']--;
- if (\Civi::$statics['testPreInstall'] <= 0) {
- unset(\Civi::$statics['testPreInstall']);
+ \Civi\Test::$statics['testPreInstall']--;
+ if (\Civi\Test::$statics['testPreInstall'] <= 0) {
+ unset(\Civi\Test::$statics['testPreInstall']);
}
}
}
unset($query, $query2, $query3);
\Civi\Test::schema()->setStrict(TRUE);
+ \Civi::reset();
});
civicrm_api('setting', 'create', ['installed' => 1, 'domain_id' => 'all', 'version' => 3]);
\Civi\Setup::log()->info(sprintf('[%s] Bootstrap CiviCRM', basename(__FILE__)));
\CRM_Core_I18n::$SQL_ESCAPER = NULL;
- unset(\Civi::$statics['testPreInstall']);
+ unset(\Civi\Test::$statics['testPreInstall']);
CRM_Core_Config::singleton(TRUE, TRUE);
return $conn->escape_string($text);
};
- \Civi::$statics['testPreInstall'] = 1;
+ \Civi\Test::$statics['testPreInstall'] = 1;
CRM_Core_Config::singleton(FALSE, TRUE);