/** * test checkRecurPaymentProcessor() method */ function testcheckRecurPaymentProcessor() { $paymentProcessor = PaypalPro::create(); $params = array('title' => 'Test Cotribution Page', 'contribution_type_id' => $this->_contributionTypeID, 'is_active' => 1, 'payment_processor_id' => $paymentProcessor); require_once 'CRM/Contribute/BAO/ContributionPage.php'; $contributionpage = CRM_Contribute_BAO_ContributionPage::create($params, $ids); $id = $contributionpage->id; $checkRecurring = CRM_Contribute_BAO_ContributionPage::checkRecurPaymentProcessor($id); $this->assertEquals($checkRecurring, false, 'Check for false return.'); }
/** * test checkRecurPaymentProcessor() method */ function testcheckRecurPaymentProcessor() { //@todo paypalpro create seems to fail silently without causing this class to fail // $this->paymentProcessorCreate may be a better option $paymentProcessor = PaypalPro::create(); $params = array('title' => 'Test Contribution Page', 'financial_type_id' => $this->_financialTypeID, 'is_active' => 1, 'payment_processor_id' => $paymentProcessor); $contributionpage = CRM_Contribute_BAO_ContributionPage::create($params); $id = $contributionpage->id; $checkRecurring = CRM_Contribute_BAO_ContributionPage::checkRecurPaymentProcessor($id); $this->assertEquals($checkRecurring, FALSE, 'Check for false return.'); ContributionPage::delete($contributionpage->id); }