diff --git a/tests/phpunit/CRM/Core/Payment/ALLPAYTest.php b/tests/phpunit/CRM/Core/Payment/ALLPAYTest.php index a0c113d04..ecf176fef 100644 --- a/tests/phpunit/CRM/Core/Payment/ALLPAYTest.php +++ b/tests/phpunit/CRM/Core/Payment/ALLPAYTest.php @@ -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;