Skip to content

Commit

Permalink
Merge pull request #289 from compucorp/6.6.0-dev
Browse files Browse the repository at this point in the history
COMCL-589: Merge Dev Branch
  • Loading branch information
shahrukh-compuco authored Aug 20, 2024
2 parents cc13566 + 5e428fe commit 7e6f2b5
Show file tree
Hide file tree
Showing 13 changed files with 98 additions and 708 deletions.
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/[email protected]
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

0 comments on commit 7e6f2b5

Please sign in to comment.