X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FWebTest%2FContribute%2FOnlineContributionTest.php;h=4f0eb82276712bf722234de05f07c05eacac6a9f;hb=6f2500ee7589360102875df4367568fe87485df6;hp=b70cef7e6fd69927b145305bec9ddb5c36e608ff;hpb=bb7a7fe21a8a8a01296978aabe03e6a6e86fc649;p=civicrm-core.git diff --git a/tests/phpunit/WebTest/Contribute/OnlineContributionTest.php b/tests/phpunit/WebTest/Contribute/OnlineContributionTest.php index b70cef7e6f..4f0eb82276 100644 --- a/tests/phpunit/WebTest/Contribute/OnlineContributionTest.php +++ b/tests/phpunit/WebTest/Contribute/OnlineContributionTest.php @@ -1,7 +1,7 @@ webtestLogin(); // Use default payment processor @@ -144,9 +144,9 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase { //Find Contribution $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low"); - $this->type("sort_name", "$firstName $lastName"); + $this->type("sort_name", "$lastName $firstName"); $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']"); - $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom",FALSE); + $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE); //View Contribution Record and verify data $expected = array( @@ -176,9 +176,9 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase { // Is contact present? $this->assertTrue($this->isTextPresent("$honorDisplayName"), "Honoree contact not found."); - } + } - function testOnlineContributionWithZeroAmount () { + public function testOnlineContributionWithZeroAmount () { $this->webtestLogin(); // Use default payment processor @@ -252,10 +252,10 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase { } /** - * @param $pageId + * @param int $pageId * @param bool $priceSet */ - function _doContributionAndVerifyData($pageId, $priceSet = FALSE) { + public function _doContributionAndVerifyData($pageId, $priceSet = FALSE) { //logout $this->webtestLogout(); $amountLabel = 'Total Amount'; @@ -293,16 +293,15 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase { $this->clickLink("_qf_Confirm_next-bottom", NULL); - //login to check contribution // Log in using webtestLogin() method $this->webtestLogin(); - //Find Contribution + //Find Contribution $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low"); - $this->type("sort_name", "$firstName $lastName"); + $this->type("sort_name", "$lastName $firstName"); $this->clickLink("_qf_Search_refresh", "xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", FALSE); $this->clickLink("xpath=//div[@id='contributionSearch']//table//tbody/tr[1]/td[11]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE); @@ -311,9 +310,8 @@ class WebTest_Contribute_OnlineContributionTest extends CiviSeleniumTestCase { 'From' => "{$firstName} {$lastName}", 'Financial Type' => 'Donation', $amountLabel => $amountValue, - 'Contribution Status' => 'Completed' + 'Contribution Status' => 'Completed', ); $this->webtestVerifyTabularData($expected); } } -