Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMCL-589: Merge Dev Branch #289

Merged
merged 8 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.51.3 --cms-ver 7.79 --web-root $GITHUB_WORKSPACE/site
run: civibuild create drupal-clean --civi-ver 5.75.0 --cms-ver 7.79 --web-root $GITHUB_WORKSPACE/site

- uses: compucorp/apply-patch@1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo: compucorp/civicrm-core
version: 5.51.3
version: 5.75.0
path: site/web/sites/all/modules/civicrm

- uses: actions/checkout@v2
Expand All @@ -46,8 +46,26 @@ jobs:
- name: Installing Manual Direct Debit and its dependencies
working-directory: ${{ env.CIVICRM_EXTENSIONS_DIR }}
run: |
git clone --depth 1 https://github.com/compucorp/uk.co.compucorp.membershipextras.git
git clone --depth 1 -b 6.6.0-dev https://github.com/compucorp/uk.co.compucorp.membershipextras.git
cv en uk.co.compucorp.membershipextras uk.co.compucorp.manualdirectdebit

- name: Setup Test DB
run: echo "CREATE DATABASE civicrm_test;" | mysql -u root --password=root --host=mysql

- name: Update civicrm.settings.php
run: |
FILE_PATH="$GITHUB_WORKSPACE/site/web/sites/default/civicrm.settings.php"
INSERT_LINE="\$GLOBALS['_CV']['TEST_DB_DSN'] = 'mysql://root:root@mysql:3306/civicrm_test?new_link=true';"
TMP_FILE=$(mktemp)
while IFS= read -r line
do
echo "$line" >> "$TMP_FILE"
if [ "$line" = "<?php" ]; then
echo "$INSERT_LINE" >> "$TMP_FILE"
fi
done < "$FILE_PATH"
mv "$TMP_FILE" "$FILE_PATH"
echo "File modified successfully."

- name: Run phpunit tests
working-directory: ${{ env.CIVICRM_EXTENSIONS_DIR }}/uk.co.compucorp.manualdirectdebit
Expand Down
7 changes: 7 additions & 0 deletions CRM/ManualDirectDebit/Form/Batch.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ class CRM_ManualDirectDebit_Form_Batch extends CRM_Admin_Form {

private $batchType;

/**
* Explicitly declare the entity api name.
*/
public function getDefaultEntity() {
return 'Batch';
}

/**
* PreProcess function.
*/
Expand Down
2 changes: 1 addition & 1 deletion CRM/ManualDirectDebit/Hook/BuildForm/CustomDataByType.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class CRM_ManualDirectDebit_Hook_BuildForm_CustomDataByType {

public function __construct($form) {
$this->form = $form;
$this->customGroupTree = $form->getVar('_groupTree');
$this->customGroupTree = $form->getVar('groupTree');
$this->directDebitInformationId = CRM_ManualDirectDebit_Common_DirectDebitDataProvider::getGroupIDByName("direct_debit_information");
}

Expand Down
2 changes: 1 addition & 1 deletion CRM/ManualDirectDebit/Upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Collection of upgrade steps.
*/
class CRM_ManualDirectDebit_Upgrader extends CRM_ManualDirectDebit_Upgrader_Base {
class CRM_ManualDirectDebit_Upgrader extends CRM_Extension_Upgrader_Base {

/**
* List of option values
Expand Down
Loading
Loading