Merge pull request #10946 from mattwire/CRM-21037_activity_sendsms_unittests
[civicrm-core.git] / tests / phpunit / WebTest / Contribute / OfflineContributionTest.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | CiviCRM version 5 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2018 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
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. |
13 | |
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. |
18 | |
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 +--------------------------------------------------------------------+
25 */
26
27 require_once 'CiviTest/CiviSeleniumTestCase.php';
28
29 /**
30 * Class WebTest_Contribute_OfflineContributionTest
31 */
32 class WebTest_Contribute_OfflineContributionTest extends CiviSeleniumTestCase {
33
34 protected function setUp() {
35 parent::setUp();
36 }
37
38 public function testStandaloneContributeAdd() {
39 $this->webtestLogin();
40
41 // Create a contact to be used as soft creditor
42 $softCreditFname = substr(sha1(rand()), 0, 7);
43 $softCreditLname = substr(sha1(rand()), 0, 7);
44 $this->webtestAddContact($softCreditFname, $softCreditLname, FALSE);
45
46 //financial account for check
47 $this->openCiviPage("admin/options/payment_instrument", "reset=1");
48 $financialAccount = $this->getText("xpath=//div[@id='payment_instrument']/table/tbody//tr/td[1]/div[text()='Check']/../../td[3]");
49
50 // Add new Financial Account
51 $orgName = 'Alberta ' . substr(sha1(rand()), 0, 7);
52 $financialAccountTitle = 'Financial Account ' . substr(sha1(rand()), 0, 4);
53 $financialAccountDescription = "{$financialAccountTitle} Description";
54 $accountingCode = 1033;
55 $financialAccountType = 'Asset';
56 $taxDeductible = FALSE;
57 $isActive = FALSE;
58 $isTax = TRUE;
59 $taxRate = 9;
60 $isDefault = FALSE;
61
62 //Add new organisation
63 if ($orgName) {
64 $this->webtestAddOrganization($orgName);
65 }
66
67 $this->_testAddFinancialAccount($financialAccountTitle,
68 $financialAccountDescription,
69 $accountingCode,
70 $orgName,
71 $financialAccountType,
72 $taxDeductible,
73 $isActive,
74 $isTax,
75 $taxRate,
76 $isDefault
77 );
78
79 $firstName = 'John' . substr(sha1(rand()), 0, 7);
80 $lastName = 'Dsouza' . substr(sha1(rand()), 0, 7);
81 $this->webtestAddContact($firstName, $lastName);
82
83 $this->waitForElementPresent("css=li#tab_contribute a");
84 $this->click("css=li#tab_contribute a");
85 $this->waitForElementPresent("link=Record Contribution (Check, Cash, EFT ...)");
86 $this->clickLink("link=Record Contribution (Check, Cash, EFT ...)", "_qf_Contribution_cancel-bottom", FALSE);
87
88 // select financial type
89 $this->select("financial_type_id", "value=1");
90
91 // fill in Received Date
92 $this->webtestFillDate('receive_date');
93
94 // source
95 $this->type("source", "Mailer 1");
96
97 // total amount
98 $this->type("total_amount", "100");
99 // revenue recognition date (CRM-16189)
100 if (CRM_Contribute_BAO_Contribution::checkContributeSettings('deferred_revenue_enabled')) {
101 $this->webtestFillDate('revenue_recognition_date', 'now+4');
102 }
103
104 // select payment instrument type = Check and enter chk number
105 $this->select("payment_instrument_id", "value=4");
106 $this->waitForElementPresent("check_number");
107 $this->type("check_number", "check #1041");
108
109 $this->type("trxn_id", "P20901X1" . rand(100, 10000));
110
111 // create first soft credit
112 $this->click("softCredit");
113 $this->waitForElementPresent("soft_credit_amount_1");
114 $this->webtestFillAutocomplete("{$softCreditLname}, {$softCreditFname}", 's2id_soft_credit_contact_id_1');
115 $this->type("soft_credit_amount_1", "50");
116
117 // add second soft credit field
118 $this->click("addMoreSoftCredit");
119 $this->waitForElementPresent("soft_credit_amount_2");
120 // create new individual via soft credit
121 $softCreditSecondFname = substr(sha1(rand()), 0, 7);
122 $softCreditSecondLname = substr(sha1(rand()), 0, 7);
123 $this->webtestNewDialogContact($softCreditSecondFname, $softCreditSecondLname, NULL, 4, 's2id_soft_credit_contact_id_2', 'soft_credit_1');
124 // enter the second soft credit
125 $this->verifyText("soft_credit_amount_2", ""); // it should be blank cause first soft credit != total_amount
126 $this->type("soft_credit_amount_2", "100"); //the sum of the soft credit amounts can exceed total_amount
127 $this->select("soft_credit_type[2]", "In Honor of");
128
129 //Custom Data
130 // $this->click('CIVICRM_QFID_3_6');
131
132 //Additional Detail section
133 $this->click("AdditionalDetail");
134 $this->waitForElementPresent("thankyou_date");
135
136 $this->type("note", "This is a test note.");
137 $this->type("non_deductible_amount", "10.00");
138 $this->type("fee_amount", "0");
139 $this->type("net_amount", "0");
140 $this->type("invoice_id", time());
141 $this->webtestFillDate('thankyou_date');
142
143 //Premium section
144 $this->click("Premium");
145 $this->waitForElementPresent("fulfilled_date");
146 $this->select("product_name[0]", "label=Coffee Mug ( MUG-101 )");
147 $this->select("product_name[1]", "label=Black");
148 $this->webtestFillDate('fulfilled_date');
149
150 // Clicking save.
151 $this->click("_qf_Contribution_upload");
152
153 // Is status message correct?
154 //$this->assertTrue($this->isTextPresent("The contribution record has been saved."), "Status message didn't show up after saving!");
155
156 // verify if Contribution is created
157 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']");
158
159 //click through to the Contribution view screen
160 $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']");
161 $this->waitForElementPresent("_qf_ContributionView_cancel-bottom");
162
163 $expected = array(
164 'Financial Type' => 'Donation',
165 'Total Amount' => '100.00',
166 'Contribution Status' => 'Completed',
167 'Payment Method' => 'Check',
168 'Check Number' => 'check #1041',
169 'Non-deductible Amount' => '10.00',
170 'Received Into' => $financialAccount,
171 );
172
173 $this->waitForElementPresent("xpath=//*[@id='ContributionView']/div[2]");
174 foreach ($expected as $value) {
175 $this->assertElementContainsText("xpath=//*[@id='ContributionView']/div[2]", $value);
176 }
177
178 // verify if soft credit was created successfully
179 $expected = array(
180 'Soft Credit To 1' => "{$softCreditFname} {$softCreditLname}",
181 'Soft Credit To 2' => "{$softCreditSecondFname} {$softCreditSecondLname}",
182 'Amount (Soft Credit Type)' => '100.00 (In Honor of)',
183 );
184
185 foreach ($expected as $value) {
186 $this->assertElementContainsText("css=table.crm-soft-credit-listing", $value);
187 }
188
189 // go to first soft creditor contact view page
190 $this->clickLink("xpath=//*[@id='ContributionView']/div[2]/div[2]/div[2]/table/tbody/tr[1]/td[1]/a", "css=li#tab_contribute a");
191
192 // go to contribution tab
193 $this->click("css=li#tab_contribute a");
194 $this->waitForElementPresent("link=Record Contribution (Check, Cash, EFT ...)");
195
196 // verify soft credit details
197 $expected = array(
198 3 => 'Solicited',
199 4 => 'Donation',
200 2 => '50.00',
201 6 => 'Completed',
202 1 => "{$firstName} {$lastName}",
203 );
204 foreach ($expected as $value => $label) {
205 $this->assertElementContainsText("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[2]/td[$value]", $label);
206 }
207 }
208
209 public function testDeductibleAmount() {
210 $this->webtestLogin();
211
212 // disable verify ssl when using authorize .net
213 $this->openCiviPage("admin/setting/url", "reset=1");
214 $this->click("id=CIVICRM_QFID_0_verifySSL");
215 $this->click("id=_qf_Url_next-bottom");
216 $this->waitForPageToLoad($this->getTimeoutMsec());
217
218 //add authorize .net payment processor
219 $processorName = 'Webtest AuthNet' . substr(sha1(rand()), 0, 7);
220 $this->webtestAddPaymentProcessor($processorName, 'AuthNet');
221
222 $this->openCiviPage("admin/contribute/managePremiums", "action=add&reset=1");
223 $premiumName = 'test Premium' . substr(sha1(rand()), 0, 7);
224 $this->addPremium($premiumName, 'SKU', 3, 12, NULL, NULL);
225
226 $firstName = 'John' . substr(sha1(rand()), 0, 7);
227 $lastName = 'Dsouza' . substr(sha1(rand()), 0, 7);
228 $this->webtestAddContact($firstName, $lastName);
229
230 //scenario 1 : is_deductible = 0 and non deductible amount is entered
231 $scenario1 = array(
232 'financial_type' => 'Campaign Contribution',
233 'total_amount' => 111,
234 'non_deductible_amount' => 15,
235 'sort_name' => "$lastName, $firstName",
236 );
237 $this->_doOfflineContribution($scenario1, $firstName, $lastName, $processorName);
238
239 $checkScenario1 = array(
240 'From' => "{$firstName} {$lastName}",
241 'Financial Type' => 'Campaign Contribution',
242 'Total Amount' => 111,
243 'Non-deductible Amount' => 15,
244 'sort_name' => "$lastName, $firstName",
245 );
246 $this->_verifyAmounts($checkScenario1);
247
248 //scenario 2 : is_deductible = TRUE and premium is set and premium is greater than total amount
249 $scenario2 = array(
250 'financial_type' => 'Donation',
251 'total_amount' => 10,
252 'premium' => "{$premiumName} ( SKU )",
253 'sort_name' => "$lastName, $firstName",
254 );
255 $this->_doOfflineContribution($scenario2, $firstName, $lastName, $processorName);
256
257 $checkScenario2 = array(
258 'From' => "{$firstName} {$lastName}",
259 'Financial Type' => 'Donation',
260 'Total Amount' => 10,
261 'Non-deductible Amount' => 10,
262 'sort_name' => "$lastName, $firstName",
263 );
264 $this->_verifyAmounts($checkScenario2);
265
266 //scenario 3 : is_deductible = TRUE and premium is set and premium is less than total amount
267 $scenario3 = array(
268 'financial_type' => 'Donation',
269 'total_amount' => 123,
270 'premium' => "{$premiumName} ( SKU )",
271 'sort_name' => "$lastName, $firstName",
272 );
273 $this->_doOfflineContribution($scenario3, $firstName, $lastName, $processorName);
274
275 $checkScenario3 = array(
276 'From' => "{$firstName} {$lastName}",
277 'Financial Type' => 'Donation',
278 'Total Amount' => 123,
279 'Non-deductible Amount' => 12,
280 'sort_name' => "$lastName, $firstName",
281 );
282 $this->_verifyAmounts($checkScenario3);
283
284 //scenario 4 : is_deductible = TRUE and premium is not set
285 $scenario4 = array(
286 'financial_type' => 'Donation',
287 'total_amount' => 123,
288 'sort_name' => "$lastName, $firstName",
289 );
290 $this->_doOfflineContribution($scenario4, $firstName, $lastName, $processorName);
291
292 $checkScenario4 = array(
293 'From' => "{$firstName} {$lastName}",
294 'Financial Type' => 'Donation',
295 'Total Amount' => 123,
296 'Non-deductible Amount' => '0.00',
297 'sort_name' => "$lastName, $firstName",
298 );
299 $this->_verifyAmounts($checkScenario4);
300
301 //scenario 5 : is_deductible = FALSE, non_deductible_amount = the total amount
302 $scenario5 = array(
303 'financial_type' => 'Campaign Contribution',
304 'total_amount' => 555,
305 'sort_name' => "$lastName, $firstName",
306 );
307 $this->_doOfflineContribution($scenario5, $firstName, $lastName, $processorName);
308
309 $checkScenario5 = array(
310 'From' => "{$firstName} {$lastName}",
311 'Financial Type' => 'Campaign Contribution',
312 'Total Amount' => 555,
313 'Non-deductible Amount' => 555,
314 'sort_name' => "$lastName, $firstName",
315 );
316 $this->_verifyAmounts($checkScenario5);
317 }
318
319 /**
320 * common function for doing offline contribution.
321 * @param array $params
322 * @param string $firstName
323 * @param string $lastName
324 * @param $processorName
325 */
326 public function _doOfflineContribution($params, $firstName, $lastName, $processorName) {
327
328 $this->waitForElementPresent("css=li#tab_contribute a");
329 $this->click("css=li#tab_contribute a");
330 $this->waitForElementPresent("link=Record Contribution (Check, Cash, EFT ...)");
331
332 // since we don't have live credentials we will switch to test mode
333 $url = $this->getAttribute("xpath=//*[@id='Search']/div[2]/div[2]/a[1]@href");
334 $url .= '&mode=test';
335 $this->open($url);
336 $this->waitForPageToLoad($this->getTimeoutMsec());
337
338 // start filling out contribution form
339 $this->waitForElementPresent('payment_processor_id');
340 $this->select('payment_processor_id', "label={$processorName}");
341
342 // select financial type
343 $this->select("financial_type_id", "label={$params['financial_type']}");
344
345 // total amount
346 $this->type("total_amount", "{$params['total_amount']}");
347
348 // enter credit card info on form
349 $this->webtestAddCreditCardDetails();
350
351 // billing address
352 $this->webtestAddBillingDetails($firstName, NULL, $lastName);
353
354 if ($nonDeductibleAmt = CRM_Utils_Array::value('non_deductible_amount', $params)) {
355 $this->click("AdditionalDetail");
356 $this->waitForElementPresent("thankyou_date");
357 $this->type("note", "This is a test note.");
358 $this->type("non_deductible_amount", "{$nonDeductibleAmt}");
359 }
360
361 if (!empty($params['premium'])) {
362 //Premium section
363 $this->click("Premium");
364 $this->waitForElementPresent("fulfilled_date");
365 $this->select("product_name[0]", "label={$params['premium']}");
366 }
367 // Clicking save.
368 $this->click("_qf_Contribution_upload-bottom");
369 $this->waitForPageToLoad($this->getTimeoutMsec());
370
371 // Is status message correct?
372 $this->assertTrue($this->isTextPresent("The contribution record has been saved."), "Status message didn't show up after saving!");
373 }
374
375 /**
376 * common function for verifing total_amount, and non_deductible_amount
377 * @param $verifyData
378 */
379 public function _verifyAmounts($verifyData) {
380 // since we are doing test contributions we need to search for test contribution and select first contribution
381 // record for the contact
382 $this->openCiviPage("contribute/search", "reset=1", "contribution_date_low");
383 $this->type("sort_name", $verifyData['sort_name']);
384
385 // select show test contributions
386 $this->click("contribution_test", "value=1");
387 $this->clickLink("_qf_Search_refresh", "xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[10]/span//a[text()='View']", FALSE);
388 $this->clickLink("xpath=//table[@class='selector row-highlight']/tbody/tr[1]/td[10]/span//a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE);
389
390 foreach ($verifyData as $label => $value) {
391 if ($label == 'sort_name') {
392 continue;
393 }
394 $this->assertElementContainsText("xpath=//form[@id='ContributionView']//table/tbody/tr/td[text()='{$label}']/following-sibling::td", "{$value}");
395 }
396
397 // now find contact and go back to contact summary
398 $this->openCiviPage("contact/search", "reset=1", "sort_name");
399 $this->type("sort_name", $verifyData['sort_name']);
400 $this->clickLink("_qf_Basic_refresh",
401 "xpath=//form[@id='Basic']/div[3]/div[1]/div[2]/table/tbody/tr[1]/td[11]/span/a[text()='View']");
402
403 $this->clickLink("xpath=//form[@id='Basic']/div[3]/div[1]/div[2]/table/tbody/tr[1]/td[11]/span/a[text()='View']",
404 'crm-contact-actions-link', FALSE);
405 }
406
407 public function testOnlineContributionWithZeroAmount() {
408 $this->webtestLogin();
409
410 // Create a contact to be used as soft creditor
411 $firstName = 'John' . substr(sha1(rand()), 0, 7);
412 $lastName = 'Peterson' . substr(sha1(rand()), 0, 7);
413 $this->webtestAddContact($firstName, $lastName);
414 $this->waitForElementPresent("css=li#tab_contribute a");
415 $this->click("css=li#tab_contribute a");
416 $this->waitForElementPresent("link=Record Contribution (Check, Cash, EFT ...)");
417 $this->clickLink("link=Record Contribution (Check, Cash, EFT ...)", "_qf_Contribution_cancel-bottom", FALSE);
418
419 // select financial type
420 $this->select("financial_type_id", "value=1");
421
422 // total amount
423 $this->type("total_amount", "0.00");
424
425 // select payment instrument
426 $this->select("payment_instrument_id", "value=1");
427
428 $this->type("trxn_id", "X20901X1" . rand(100, 10000));
429 $this->click('_qf_Contribution_upload-bottom');
430 $this->waitForText("crm-notification-container", "The contribution record has been saved.");
431
432 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']");
433 $this->clickLink("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='View']", "_qf_ContributionView_cancel-bottom", FALSE);
434 $expected = array(
435 'Financial Type' => 'Donation',
436 'Total Amount' => '0.00',
437 'Contribution Status' => 'Completed',
438 'Payment Method' => 'Credit Card',
439 );
440 $this->webtestVerifyTabularData($expected);
441 }
442
443 public function testDefaultCurrancy() {
444 $this->webtestLogin();
445 $this->enableCurrency(array('GBP', 'EUR'));
446
447 //Create a contact.
448 $firstName = 'John' . substr(sha1(rand()), 0, 7);
449 $lastName = 'Peterson' . substr(sha1(rand()), 0, 7);
450 $this->webtestAddContact($firstName, $lastName);
451
452 //Create contribution for contact
453 $this->waitForElementPresent("css=li#tab_contribute a");
454 $this->click("css=li#tab_contribute a");
455 $this->waitForElementPresent("link=Record Contribution (Check, Cash, EFT ...)");
456 $this->click("link=Record Contribution (Check, Cash, EFT ...)");
457 $this->waitForElementPresent("financial_type_id");
458 $this->select("financial_type_id", "value=1");
459 $this->select("currency", "value=GBP");
460 $this->type("total_amount", "100");
461 $this->click("xpath=//div[@class='ui-dialog-buttonset']//button//span[text()='Save']");
462 $this->waitForAjaxContent();
463 $this->waitForElementPresent("xpath=//table[@class='selector row-highlight']");
464 $this->assertElementContainsText("xpath=//table[@class='selector row-highlight']/tbody/tr//td/a", "£ 100.00");
465 $this->click("xpath=//table[@class='selector row-highlight']/tbody/tr//td/a", "£ 100.00");
466 $this->waitForElementPresent("xpath=//table[@id='info']");
467 $this->assertElementContainsText("xpath=//table[@id='info']/tbody/tr[2]/td[1]", "£ 100.00");
468 }
469
470 public function testRevenueRecognitionDateAdd() {
471 $this->webtestLogin();
472 $this->openCiviPage("admin/setting/preferences/contribute", "reset=1");
473 $this->waitForElementPresent("_qf_Contribute_next");
474 $this->click('deferred_revenue_enabled');
475 $this->click('_qf_Contribute_next');
476 $this->waitForPageToLoad($this->getTimeoutMsec());
477
478 // Create a contact to be used as soft creditor
479 $softCreditFname = substr(sha1(rand()), 0, 7);
480 $softCreditLname = substr(sha1(rand()), 0, 7);
481 $this->webtestAddContact($softCreditFname, $softCreditLname, FALSE);
482
483 //financial account for check
484 $this->openCiviPage("admin/options/payment_instrument", "reset=1");
485 $financialAccount = $this->getText("xpath=//div[@id='payment_instrument']/table/tbody//tr/td[1]/div[text()='Check']/../../td[3]");
486
487 // Add new Financial Account
488 $orgName = 'Alberta ' . substr(sha1(rand()), 0, 7);
489 $financialAccountTitle = 'Financial Account ' . substr(sha1(rand()), 0, 4);
490 $financialAccountDescription = "{$financialAccountTitle} Description";
491 $accountingCode = 1033;
492 $financialAccountType = 'Asset';
493 $taxDeductible = FALSE;
494 $isActive = FALSE;
495 $isTax = TRUE;
496 $taxRate = 9;
497 $isDefault = FALSE;
498
499 //Add new organisation
500 if ($orgName) {
501 $this->webtestAddOrganization($orgName);
502 }
503
504 $this->_testAddFinancialAccount($financialAccountTitle,
505 $financialAccountDescription,
506 $accountingCode,
507 $orgName,
508 $financialAccountType,
509 $taxDeductible,
510 $isActive,
511 $isTax,
512 $taxRate,
513 $isDefault
514 );
515
516 $firstName = 'John' . substr(sha1(rand()), 0, 7);
517 $lastName = 'Dsouza' . substr(sha1(rand()), 0, 7);
518 $this->webtestAddContact($firstName, $lastName);
519
520 $this->waitForElementPresent("css=li#tab_contribute a");
521 $this->click("css=li#tab_contribute a");
522 $this->waitForElementPresent("link=Record Contribution (Check, Cash, EFT ...)");
523 $this->clickLink("link=Record Contribution (Check, Cash, EFT ...)", "_qf_Contribution_cancel-bottom", FALSE);
524
525 // select financial type
526 $this->select("financial_type_id", "value=1");
527
528 // fill in Received Date
529 $this->webtestFillDate('receive_date');
530
531 // source
532 $this->type("source", "Mailer 1");
533
534 // total amount
535 $this->type("total_amount", "100");
536
537 // revenue recognition date (CRM-16189)
538 $this->webtestFillDate('revenue_recognition_date', 'now');
539
540 // select payment instrument type = Check and enter chk number
541 $this->select("payment_instrument_id", "value=4");
542 $this->waitForElementPresent("check_number");
543 $this->type("check_number", "check #1041");
544
545 $this->type("trxn_id", "P20901X1" . rand(100, 10000));
546
547 //Additional Detail section
548 $this->click("AdditionalDetail");
549 $this->waitForElementPresent("thankyou_date");
550
551 $this->type("note", "This is a test note.");
552 $this->type("non_deductible_amount", "10.00");
553 $this->type("fee_amount", "0");
554 $this->type("net_amount", "0");
555 $this->type("invoice_id", time());
556 $this->webtestFillDate('thankyou_date');
557
558 // Clicking save.
559 $this->click("_qf_Contribution_upload");
560
561 // verify if Contribution is created
562 $this->waitForElementPresent("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='Edit']");
563
564 //click through to the Contribution edit screen
565 $this->click("xpath=//div[@class='view-content']//table[@class='selector row-highlight']//tbody/tr[1]/td[8]/span/a[text()='Edit']");
566 $this->waitForElementPresent("_qf_Contribution_cancel");
567 $val = $this->getValue("xpath=//input[@id='revenue_recognition_date']");
568 $this->assertEquals(date('m/d/Y'), $val);
569 }
570
571 }