4 * Test CRM_Event_Form_Registration functions.
9 class CRM_Event_Form_Registration_ConfirmTest
extends CiviUnitTestCase
{
11 public function setUp() {
12 $this->useTransaction(TRUE);
17 * Initial test of submit function.
21 public function testSubmit() {
22 $event = $this->eventCreate();
23 CRM_Event_Form_Registration_Confirm
::testSubmit(array(
25 'contributeMode' => 'direct',
26 'registerByID' => $this->createLoggedInUser(),
29 'qfKey' => 'e6eb2903eae63d4c5c6cc70bfdda8741_2801',
30 'entryURL' => 'http://dmaster.local/civicrm/event/register?reset=1&id=3',
33 'email-Primary' => 'demo@example.com',
34 'hidden_processor' => '1',
35 'credit_card_number' => '4111111111111111',
37 'credit_card_exp_date' => array(
41 'credit_card_type' => 'Visa',
42 'billing_first_name' => 'p',
43 'billing_middle_name' => '',
44 'billing_last_name' => 'p',
45 'billing_street_address-5' => 'p',
46 'billing_city-5' => 'p',
47 'billing_state_province_id-5' => '1061',
48 'billing_postal_code-5' => '7',
49 'billing_country_id-5' => '1228',
56 'payment_processor_id' => '1',
57 'bypass_payment' => '',
58 'MAX_FILE_SIZE' => '33554432',
61 'campaign_id' => NULL,
63 'participant_role_id' => '1',
64 'currencyID' => 'USD',
65 'amount_level' => '\ 1Tiny-tots (ages 5-8) - 1\ 1',
70 'ip_address' => '127.0.0.1',
71 'invoiceID' => '57adc34957a29171948e8643ce906332',
72 'button' => '_qf_Register_upload',
73 'billing_state_province-5' => 'AP',
74 'billing_country-5' => 'US',
78 $this->callAPISuccessGetSingle('Participant', array());