$this->openCiviPage('pledge/add', 'reset=1&context=standalone', '_qf_Pledge_upload');
// create new contact using dialog
- $firstName = 'Ma' . substr(sha1(rand()), 0, 4);
- $lastName = 'Za' . substr(sha1(rand()), 0, 7);
- $this->webtestNewDialogContact($firstName, $lastName, $firstName . '@example.com');
+ $contact = $this->createDialogContact();
$this->type('amount', '2400');
$this->type('installments', '10');
$pledgeDate = date('F jS, Y', strtotime('now'));
$this->webtestVerifyTabularData(array(
- 'Pledge By' => $firstName . ' ' . $lastName,
+ 'Pledge By' => $contact['display_name'],
'Total Pledge Amount' => '$ 2,400.00',
'To be paid in' => '10 installments of $ 240.00 every 1 month(s)',
'Payments are due on the' => '2 day of the period',