3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.6 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2015 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License along with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
28 require_once 'CiviTest/CiviSeleniumTestCase.php';
31 * Class WebTest_Contribute_UpdateContributionTest
33 class WebTest_Contribute_UpdateContributionTest
extends CiviSeleniumTestCase
{
35 protected function setUp() {
39 public function testChangeContributionAmount() {
40 $this->webtestLogin();
42 //Offline Pay Later Contribution
43 $contact = $this->_testOfflineContribution($amount, "Pending");
45 $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low");
47 $this->type("sort_name", $contact['sort_name']);
48 $this->click("_qf_Search_refresh");
50 $this->waitForElementPresent("xpath=//*[@id='Search']//div[@id='contributionSearch']");
51 $contriIDOff = explode('&', $this->getAttribute("xpath=//div[@id='contributionSearch']//table[@class='selector row-highlight']/tbody/tr[1]/td[11]/span/a[1]@href"));
52 if (!empty($contriIDOff)) {
53 $contriIDOff = substr($contriIDOff[1], (strrpos($contriIDOff[1], '=') +
1));
56 $this->clickLink("xpath=//tr[@id='rowid{$contriIDOff}']/td[11]/span/a[2]", "total_amount", FALSE);
57 $this->waitForAjaxContent();
58 $this->type("total_amount", "90");
59 $this->clickLink('_qf_Contribution_upload', '', FALSE);
60 $this->waitForAjaxContent();
61 $this->waitForText('crm-notification-container', "The sum of fee amount and net amount must be equal to total amount");
62 $this->type("net_amount", "90");
63 $this->clickLink('_qf_Contribution_upload', '', FALSE);
65 // Is status message correct?
66 $this->waitForText('crm-notification-container', "The contribution record has been saved.");
69 $searchParams = array('id' => $contriIDOff);
70 $compareParams = array('total_amount' => '90.00');
72 $lineItemSearchParams = array('entity_id' => $contriIDOff);
73 $lineItemCompareParams = array('line_total' => '90.00');
75 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $searchParams, $compareParams);
76 $this->assertDBCompareValues('CRM_Price_DAO_LineItem', $lineItemSearchParams, $lineItemCompareParams);
78 $total = $this->_getTotalContributedAmount($contriIDOff);
79 $compare = array('total_amount' => $total);
80 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $searchParams, $compare);
82 $amount = $this->_getFinancialItemAmount($contriIDOff);
83 $compare = array('total_amount' => $amount);
84 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $searchParams, $compare);
86 $financialTrxnAmount = $this->_getFinancialTrxnAmount($contriIDOff);
87 $compare = array('total_amount' => $financialTrxnAmount);
88 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $searchParams, $compare);
91 public function testPayLater() {
92 $this->webtestLogin();
94 //Offline Pay Later Contribution
95 $this->_testOfflineContribution($amount, "Pending");
96 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']");
97 $contId = $this->urlArg('id', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
98 $this->clickAjaxLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", '_qf_Contribution_cancel-bottom');
99 $this->select("contribution_status_id", "label=Completed");
100 $this->clickAjaxLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']");
101 $this->checkCRMAlert("The contribution record has been saved.");
104 $search = array('id' => $contId);
105 $compare = array('contribution_status_id' => 1);
106 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $search, $compare);
108 $lineItem = key(CRM_Price_BAO_LineItem
::getLineItems($contId, 'contribution'));
109 $search = array('entity_id' => $lineItem);
110 $compare = array('status_id' => 1);
111 $this->assertDBCompareValues("CRM_Financial_DAO_FinancialItem", $search, $compare);
113 $status = $this->_getPremiumActualCost($contId, 'Accounts Receivable', 'Payment Processor Account', NULL, "'civicrm_contribution'", "ft.status_id as status");
114 $this->assertEquals($status, '1', "Verify Completed Status");
117 public function testChangePremium() {
118 $this->webtestLogin();
120 $to = 'Premiums inventory';
121 $financialType = array(
122 'name' => 'Test Financial' . substr(sha1(rand()), 0, 7),
124 'is_deductible' => 1,
126 $this->addeditFinancialType($financialType);
127 $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody//tr/td/div[text()='" . $financialType['name'] . "']/../../td[7]/span/a[text()='Accounts']");
128 $this->click("xpath=//div[@id='ltype']/div/table/tbody//tr/td/div[text()='" . $financialType['name'] . "']/../../td[7]/span/a[text()='Accounts']");
129 $this->waitForElementPresent("xpath=//a[@id='newfinancialTypeAccount']");
130 $this->clickAjaxLink("xpath=//a[@id='newfinancialTypeAccount']", "_qf_FinancialTypeAccount_cancel-botttom");
131 $this->select("account_relationship", "label=Premiums Inventory Account is");
132 $this->waitForElementPresent("xpath=//select[@id='financial_account_id']/option[3][text()='Deposit Bank Account']");
133 $this->select("financial_account_id", "label=$to");
134 $this->clickAjaxLink("_qf_FinancialTypeAccount_next-botttom", "xpath=//a[@id='newfinancialTypeAccount']");
136 $premiumName = 'Premium' . substr(sha1(rand()), 0, 7);
141 $this->openCiviPage("admin/contribute/managePremiums", "action=add&reset=1");
143 $this->addPremium($premiumName, $sku, $amount, $price, $cost, $financialType['name']);
146 $premiumName2 = 'Premium' . substr(sha1(rand()), 0, 7);
151 $this->openCiviPage("admin/contribute/managePremiums", "action=add&reset=1");
152 $this->addPremium($premiumName2, $sku2, $amount2, $price2, $cost2, $financialType['name']);
154 // add contribution with premium
155 $this->openCiviPage("contribute/add", "reset=1&action=add&context=standalone");
157 // create new contact using dialog
158 $this->createDialogContact();
159 // select financial type
160 $this->select("financial_type_id", "value=1");
162 $this->type("total_amount", "100");
163 // fill Premium information
164 $this->clickAjaxLink("xpath=//div[@id='Premium']", "product_name_0");
165 $this->select('product_name_0', "label=$premiumName ( $sku )");
167 $this->clickAjaxLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']");
168 // Is status message correct?
169 $this->checkCRMAlert("The contribution record has been saved.");
170 // verify if Contribution is created
171 //click through to the Contribution edit screen
172 $contId = $this->urlArg('id', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
173 $this->clickAjaxLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", "product_name_0");
175 $this->select('product_name_0', "label=$premiumName2 ( $sku2 )");
177 $this->clickAjaxLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[7][text()='$premiumName2']");
178 $this->checkCRMAlert("The contribution record has been saved.");
181 $actualAmount = $this->_getPremiumActualCost($contId, $to, $from, $cost2, "'civicrm_contribution'");
182 $this->assertEquals($actualAmount, $cost2, "Verify actual cost for changed premium");
184 $deletedAmount = $this->_getPremiumActualCost($contId, $from, $to, $cost, "'civicrm_contribution'");
185 $this->assertEquals($deletedAmount, $cost, "Verify actual cost for deleted premium");
188 public function testDeletePremium() {
189 $this->webtestLogin();
191 $to = 'Premiums inventory';
192 $financialType = array(
193 'name' => 'Test Financial' . substr(sha1(rand()), 0, 7),
195 'is_deductible' => 1,
197 $this->addeditFinancialType($financialType);
198 $this->waitForElementPresent("xpath=//div[@id='ltype']/div/table/tbody//tr/td/div[text()='" . $financialType['name'] . "']/../../td[7]/span/a[text()='Accounts']");
199 $this->click("xpath=//div[@id='ltype']/div/table/tbody//tr/td/div[text()='" . $financialType['name'] . "']/../../td[7]/span/a[text()='Accounts']");
200 $this->waitForElementPresent("xpath=//a[@id='newfinancialTypeAccount']");
201 $this->clickLink("xpath=//a[@id='newfinancialTypeAccount']", "_qf_FinancialTypeAccount_cancel-botttom", FALSE);
203 $this->select("account_relationship", "label=Premiums Inventory Account is");
204 $this->waitForElementPresent("xpath=//select[@id='financial_account_id']/option[3][text()='Deposit Bank Account']");
205 $this->select("financial_account_id", "label=$to");
206 $this->clickLink("_qf_FinancialTypeAccount_next-botttom", "xpath=//a[@id='newfinancialTypeAccount']", FALSE);
207 $premiumName = 'Premium' . substr(sha1(rand()), 0, 7);
212 $this->openCiviPage("admin/contribute/managePremiums", "action=add&reset=1");
214 $this->addPremium($premiumName, $sku, $amount, $price, $cost, $financialType['name']);
216 // add contribution with premium
217 $this->openCiviPage("contribute/add", "reset=1&action=add&context=standalone");
219 // create new contact using dialog
220 $this->createDialogContact();
221 // select financial type
222 $this->select("financial_type_id", "value=1");
224 $this->type("total_amount", "100");
225 // fill Premium information
226 $this->click("xpath=//div[@id='Premium']");
227 $this->waitForElementPresent("product_name_0");
228 $this->select('product_name_0', "label=$premiumName ( $sku )");
230 $this->clickLink("_qf_Contribution_upload");
231 // Is status message correct?
232 $this->waitForText('crm-notification-container', "The contribution record has been saved.");
233 // verify if Contribution is created
234 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']");
235 //click through to the Contribution edit screen
236 $contId = explode('&id=', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
237 $contId = explode('&', $contId[1]);
238 $contId = $contId[0];
239 $this->clickLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", "_qf_Contribution_upload-bottom", FALSE);
240 $this->waitForElementPresent("product_name_0");
241 $this->select('product_name_0', "value=0");
243 $this->clickLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[7][not(text())]", FALSE);
246 $actualAmount = $this->_getPremiumActualCost($contId, $from, $to, NULL, "'civicrm_contribution'");
247 $this->assertEquals($actualAmount, $cost, "Verify actual cost for deleted premium");
250 public function testChangePaymentInstrument() {
251 $this->webtestLogin();
252 $label = 'TEST' . substr(sha1(rand()), 0, 7);
254 $financialAccount = CRM_Contribute_PseudoConstant
::financialAccount();
255 $to = array_search('Accounts Receivable', $financialAccount);
256 $from = array_search('Deposit Bank Account', $financialAccount);
257 $this->addPaymentInstrument($label, $to);
258 $this->_testOfflineContribution($amount);
259 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']");
260 $this->clickLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", '_qf_Contribution_cancel-bottom', FALSE);
261 $contId = explode('&id=', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
262 $contId = explode('&', $contId[1]);
263 $contId = $contId[0];
264 //change payment processor to newly created value
265 $this->select("payment_instrument_id", "label=$label");
266 $this->clickLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", FALSE);
267 $this->waitForAjaxContent();
269 $subtractedTotal = $this->_getPremiumActualCost($contId, NULL, 'Payment Processor Account');
270 $this->assertEquals($subtractedTotal, -$amount, "Verify amount deleted from old account");
271 $totalAmount = $this->_getPremiumActualCost($contId, NULL, 'Accounts Receivable');
272 $this->assertEquals($totalAmount, $amount, "Verify amount for newly inserted values");
275 public function testRefundContribution() {
276 $this->webtestLogin();
278 $this->_testOfflineContribution($amount);
279 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']");
280 $this->clickAjaxLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", '_qf_Contribution_cancel-bottom');
281 //Contribution status
282 $this->select("contribution_status_id", "label=Refunded");
283 $contId = explode('&id=', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
284 $contId = explode('&', $contId[1]);
285 $contId = $contId[0];
286 $this->clickAjaxLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[6][text()='Refunded']");
289 $lineItem = key(CRM_Price_BAO_LineItem
::getLineItems($contId, 'contribution'));
290 $search = array('entity_id' => $lineItem);
292 'amount' => '100.00',
295 $this->assertDBCompareValues("CRM_Financial_DAO_FinancialItem", $search, $compare);
296 $amount = $this->_getPremiumActualCost($contId, NULL, 'Payment Processor Account', -100.00, "'civicrm_contribution'");
297 $this->assertEquals($amount, '-100.00', 'Verify Financial Trxn Amount.');
300 public function testCancelPayLater() {
301 $this->webtestLogin();
303 $this->_testOfflineContribution($amount, "Pending");
304 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']");
305 $this->clickLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", '_qf_Contribution_cancel-bottom', FALSE);
306 //Contribution status
307 $this->select("contribution_status_id", "label=Cancelled");
308 $contId = explode('&id=', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
309 $contId = explode('&', $contId[1]);
310 $contId = $contId[0];
311 $this->clickLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", FALSE);
312 $this->waitForText('crm-notification-container', "The contribution record has been saved.");
315 $search = array('id' => $contId);
316 $compare = array('contribution_status_id' => 3);
317 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $search, $compare);
318 $lineItem = key(CRM_Price_BAO_LineItem
::getLineItems($contId, 'contribution'));
320 'amount' => '-100.00',
321 'entity_id' => $lineItem,
324 $items = CRM_Financial_BAO_FinancialItem
::retrieve($itemParams, $defaults);
325 $this->assertEquals($items->amount
, $itemParams['amount'], 'Verify Amount for financial Item');
326 $totalAmount = $this->_getPremiumActualCost($items->id
, 'Accounts Receivable', NULL, "-100.00", "'civicrm_financial_item'");
327 $this->assertEquals($totalAmount, "-$amount", 'Verify Amount for Financial Trxn');
328 $totalAmount = $this->_getPremiumActualCost($contId, 'Accounts Receivable', NULL, "-100.00", "'civicrm_contribution'");
329 $this->assertEquals($totalAmount, "-$amount", 'Verify Amount for Financial Trxn');
332 public function testChangeFinancialType() {
333 $this->webtestLogin();
335 $this->_testOfflineContribution($amount);
336 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']");
337 $this->clickLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", '_qf_Contribution_cancel-bottom', FALSE);
338 //Contribution status
339 $this->select("financial_type_id", "value=3");
340 $contId = explode('&id=', $this->getAttribute("xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']@href"));
341 $contId = explode('&', $contId[1]);
342 $contId = $contId[0];
343 $this->clickLink("_qf_Contribution_upload", "xpath=//div[@class='view-content']//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='Edit']", FALSE);
344 $this->waitForText('crm-notification-container', "The contribution record has been saved.");
347 $search = array('id' => $contId);
348 $compare = array('financial_type_id' => 3);
349 $this->assertDBCompareValues('CRM_Contribute_DAO_Contribution', $search, $compare);
351 $lineItem = key(CRM_Price_BAO_LineItem
::getLineItems($contId, 'contribution'));
353 'amount' => '-100.00',
354 'entity_id' => $lineItem,
356 $item1 = $item2 = array();
357 CRM_Financial_BAO_FinancialItem
::retrieve($itemParams, $item1);
358 $this->assertEquals($item1['amount'], "-100.00", "Verify Amount for New Financial Item");
359 $itemParams['amount'] = '100.00';
360 CRM_Financial_BAO_FinancialItem
::retrieve($itemParams, $item2);
361 $this->assertEquals($item2['amount'], "100.00", "Verify Amount for New Financial Item");
363 $cValue1 = $this->_getPremiumActualCost($contId, NULL, NULL, "-100.00", "'civicrm_contribution'");
364 $fValue1 = $this->_getPremiumActualCost($item1['id'], NULL, NULL, "-100.00", "'civicrm_financial_item'");
365 $this->assertEquals($cValue1, "-100.00", "Verify Amount");
366 $this->assertEquals($fValue1, "-100.00", "Verify Amount");
367 $cValue2 = $this->_getPremiumActualCost($contId, NULL, NULL, "100.00", "'civicrm_contribution'");
368 $fValue2 = $this->_getPremiumActualCost($item2['id'], NULL, NULL, "100.00", "'civicrm_financial_item'");
369 $this->assertEquals($cValue2, "100.00", "Verify Amount");
370 $this->assertEquals($fValue2, "100.00", "Verify Amount");
374 * @param int $entityId
378 * @param null $entityTable
379 * @param string $select
381 * @return null|string
383 public function _getPremiumActualCost($entityId, $from = NULL, $to = NULL, $cost = NULL, $entityTable = NULL, $select = "ft.total_amount AS amount") {
384 $financialAccount = CRM_Contribute_PseudoConstant
::financialAccount();
387 FROM civicrm_financial_trxn ft
388 INNER JOIN civicrm_entity_financial_trxn eft ON eft.financial_trxn_id = ft.id AND eft.entity_id = {$entityId}";
390 $query .= " AND eft.entity_table = {$entityTable}";
393 $to = array_search($to, $financialAccount);
394 $query .= " AND ft.to_financial_account_id = {$to}";
397 $from = array_search($from, $financialAccount);
398 $query .= " AND ft.from_financial_account_id = {$from}";
401 $query .= " AND eft.amount = {$cost}";
403 $query .= " ORDER BY ft.id DESC LIMIT 1";
404 $result = CRM_Core_DAO
::singleValueQuery($query);
411 * @return null|string
413 public function _getFinancialTrxnAmount($contId) {
415 SUM( ft.total_amount ) AS total
416 FROM civicrm_financial_trxn AS ft
417 LEFT JOIN civicrm_entity_financial_trxn AS ceft ON ft.id = ceft.financial_trxn_id
418 WHERE ceft.entity_table = 'civicrm_contribution'
419 AND ceft.entity_id = {$contId}";
420 $result = CRM_Core_DAO
::singleValueQuery($query);
427 * @return null|string
429 public function _getFinancialItemAmount($contId) {
430 $lineItem = key(CRM_Price_BAO_LineItem
::getLineItems($contId, 'contribution'));
433 FROM civicrm_financial_item
434 WHERE entity_table = 'civicrm_line_item'
435 AND entity_id = {$lineItem}";
436 $result = CRM_Core_DAO
::singleValueQuery($query);
443 * @return null|string
445 public function _getTotalContributedAmount($contId) {
448 FROM civicrm_entity_financial_trxn
449 WHERE entity_table = 'civicrm_contribution'
450 AND entity_id = {$contId}";
451 $result = CRM_Core_DAO
::singleValueQuery($query);
457 * @param string $status
460 public function _testOfflineContribution($amount, $status = "Completed") {
462 $this->openCiviPage("contribute/add", "reset=1&context=standalone", "_qf_Contribution_upload");
464 // create new contact using dialog
465 $contact = $this->createDialogContact();
467 // select financial type
468 $this->select("financial_type_id", "value=1");
470 //Contribution status
471 $this->select("contribution_status_id", "label=$status");
474 $this->type("total_amount", $amount);
476 // select payment instrument type
477 $this->select("payment_instrument_id", "label=Credit Card");
479 $this->type("trxn_id", "P20901X1" . rand(100, 10000));
482 //$this->click('CIVICRM_QFID_3_6');
485 $this->clickLink("_qf_Contribution_upload");
487 // Is status message correct?
488 $this->checkCRMAlert("The contribution record has been saved.");
490 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']");
491 // verify if Membership is created
493 //click through to the Membership view screen
494 $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[8]/span/a[text()='View']");
497 'Financial Type' => 'Donation',
498 'Total Amount' => '100.00',
499 'Contribution Status' => $status,
501 $this->webtestVerifyTabularData($expected);
502 $this->click("_qf_ContributionView_cancel-bottom");