<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
*/
require_once 'CiviTest/CiviSeleniumTestCase.php';
+
+/**
+ * Class WebTest_Contribute_ConfirmOptionalTest
+ */
class WebTest_Contribute_ConfirmOptionalTest extends CiviSeleniumTestCase {
protected $pageId = 0;
parent::setUp();
}
- function testWithConfirm() {
+ public function testWithConfirm() {
$this->_addContributionPage(TRUE);
$this->_fillOutContributionPage();
$this->assertTrue($this->isTextPresent("Your transaction has been processed successfully"), "Should load thank you page");
}
- function testWithoutConfirm() {
+ public function testWithoutConfirm() {
$this->_addContributionPage(FALSE);
$this->_fillOutContributionPage();
$this->assertFalse($this->isTextPresent("Your contribution will not be completed until"), "Loaded confirmation page");
}
+ /**
+ * @param $isConfirmEnabled
+ */
protected function _addContributionPage($isConfirmEnabled) {
// log in
$this->webtestLogin();
$isPcpApprovalNeeded = FALSE,
$isSeparatePayment = FALSE,
$honoreeSection = FALSE,
- $allowOtherAmmount = TRUE,
+ $allowOtherAmount = TRUE,
$isConfirmEnabled = $isConfirmEnabled
);
}
$this->waitForPageToLoad($this->getTimeoutMsec());
}
}
-