Skip to content

Commit

Permalink
Standalone - Fix running headless tests
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Sep 24, 2024
1 parent 46d0c42 commit daa0835
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/standaloneusers/CRM/Standaloneusers/Upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ class CRM_Standaloneusers_Upgrader extends CRM_Extension_Upgrader_Base {
public function preInstall() {
$config = \CRM_Core_Config::singleton();
// We generally only want to run on standalone. In theory, we might also run headless tests.
if (!in_array(get_class($config->userPermissionClass), ['CRM_Core_Permission_Standalone', 'CRM_Core_Permission_Headless'])) {
if (!in_array(get_class($config->userPermissionClass), ['CRM_Core_Permission_Standalone', 'CRM_Core_Permission_UnitTests'])) {
throw new \CRM_Core_Exception("standaloneusers can only be installed on standalone");
}
if (!in_array(get_class($config->userSystem), ['CRM_Utils_System_Standalone', 'CRM_Utils_System_Headless'])) {
if (!in_array(get_class($config->userSystem), ['CRM_Utils_System_Standalone', 'CRM_Utils_System_UnitTests'])) {
throw new \CRM_Core_Exception("standaloneusers can only be installed on standalone");
}
CRM_Core_DAO::executeQuery('DROP TABLE civicrm_uf_match');
Expand Down

0 comments on commit daa0835

Please sign in to comment.