Skip to content

Commit

Permalink
Merge pull request #29 from compucorp/MAE-807-PHP8
Browse files Browse the repository at this point in the history
CIVIIB-54: Merge PHP 8 branch to Master
  • Loading branch information
omarabuhussein authored Jan 20, 2023
2 parents 83a6f3c + baecbeb commit 56ca0a4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
run-unit-tests:

runs-on: ubuntu-latest
container: compucorp/civicrm-buildkit:1.0.0
container: compucorp/civicrm-buildkit:1.3.0-php8.0-chrome

env:
CIVICRM_EXTENSIONS_DIR: site/web/sites/all/modules/civicrm/tools/extensions
Expand All @@ -29,14 +29,14 @@ jobs:
run : amp config:set --mysql_dsn=mysql://root:root@mysql:3306

- name: Build Drupal site
run: civibuild create drupal-clean --civi-ver 5.28.3 --cms-ver 7.75 --web-root $GITHUB_WORKSPACE/site
run: civibuild create drupal-clean --civi-ver 5.51.3 --cms-ver 7.79 --web-root $GITHUB_WORKSPACE/site

- uses: compucorp/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo: compucorp/civicrm-core
version: 5.28.3
version: 5.51.3
path: site/web/sites/all/modules/civicrm

- uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion CRM/EventsExtras/Form/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ public function setDefaultValues() {
}

$defaults['eventsextras_payment_processor_selection_default'] =
array_fill_keys($defaults['eventsextras_payment_processor_selection_default'], '1');
is_array($defaults['eventsextras_payment_processor_selection_default']) ?
array_fill_keys($defaults['eventsextras_payment_processor_selection_default'], '1') : NULL;

return $defaults;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ class CRM_EventsExtras_Hook_BuildForm_EventFeeTest extends BaseHeadlessTest {
*/
private $eventFeeForm;

public function setUp() {
public function setUp(): void {
$formController = new CRM_Core_Controller();
$this->eventFeeForm = new CRM_Event_Form_ManageEvent_Fee();
$this->eventFeeForm->controller = $formController;
$this->eventFeeForm->buildForm();
}

public function testSetDefault() {
$this->assertNull($this->eventFeeForm->getElementValue('payment_processor')[0]);
$this->assertEmpty($this->eventFeeForm->getElementValue('payment_processor'));

SettingFabricator::fabricate([
SettingsManager::SETTING_FIELDS['PAYMENT_PROCESSOR_SELECTION'] => 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function testSetDefault() {
$eventInfoForm->controller = $formController;
$eventInfoForm->buildForm();

$this->assertNull($eventInfoForm->getElementValue('default_role_id')[0]);
$this->assertEmpty($eventInfoForm->getElementValue('default_role_id'));

SettingFabricator::fabricate([
SettingsManager::SETTING_FIELDS['ROLES'] => 0,
Expand Down

0 comments on commit 56ca0a4

Please sign in to comment.