Skip to content

Commit

Permalink
refs #38111, fixes allpay testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jimyhuang committed May 7, 2024
1 parent 265351e commit 87bdb63
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions tests/phpunit/CRM/Core/Payment/ALLPAYTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,9 @@ function get_info() {
*/
function setUpTest() {
parent::setUp();
$version = CRM_Core_Config::$_userSystem->version;
if($version < 8){
$payment_page = variable_get('civicrm_demo_payment_page', array());
}
else {
$payment_page = \Drupal::state()->get('civicrm_demo.payment_page');
}
if(isset($payment_page['Payment_ALLPAY'])){
$this->_page_id = $payment_page['Payment_ALLPAY'];
}
else {
$this->assertNotEmpty($this->_page_id, 'You need to have contribution page to procceed.');
}
$pageId = CRM_Core_DAO::singleValueQuery("SELECT id FROM civicrm_contribution_page ORDER BY id");
$this->assertNotEmpty($pageId, 'You need to have contribution page to procceed.');
$this->_page_id = $pageId;

$this->_is_test = 1;

Expand Down

0 comments on commit 87bdb63

Please sign in to comment.