Odyssey
Public Member Functions | List of all members
IPAYEnrollTest Class Reference
Inheritance diagram for IPAYEnrollTest:

Public Member Functions

 test_IPAYcred ()
 
 test_HCUcred ()
 
 test_EnrollXML_List ($MIR, $expected, $IPAYcred, $HCUcred)
 
 MIRProvider ()
 

Detailed Description

Definition at line 13 of file IPAYEnrollTest.php.

Member Function Documentation

◆ MIRProvider()

IPAYEnrollTest::MIRProvider ( )

untested: malformed email w/o HCUcred['ml'] missing email w/o HCUcred['ml'] IPAYcred['enrollmicr'] true IPAYcred['enrollmicr'] true w/o HCUcred['micr'] IPAYcred['enrollmicr'] true w/ invalid HCUcred['micr'] missing reqMIR values other than email test BizFNdot all 3 settings

Definition at line 59 of file IPAYEnrollTest.php.

60  {
61  //(MIR_packet_data, HCU_email, required_in_MIR_result, date_fmt, phones_format,
62  // unset_Empty_values, empty_FN_as_dot, item_to_examine, expected_result)
63  return [
64  'valid packet' => [['data' =>
65  ['accountnumber' => '22891',
66  'firstname' => 'Kevin', 'middlename' => 'O','lastname' => 'Williams',
67  'email' => 'youngson@yahoo.com', 'homephone' => '208-555-0228',
68  'workphone' => '', 'cellphone' => '', 'fax' => '', 'ssn' => '228-29-3342',
69  'address1' => '373 Richland Ave', 'address2' => '',
70  'city' => 'Shire', 'state' => 'ID', 'zip' => '83111', 'cc' => 'US',
71  'dob' => '1991-02-28', 'class' => 'P']],
72  '<HomePhone>208-555-0228</HomePhone>'],
73 
74  'business FNdot' => [['data' =>
75  ['accountnumber' => '22891',
76  'firstname' => '', 'middlename' => '','lastname' => 'Williams',
77  'email' => 'youngson@yahoo.com', 'homephone' => '208-555-0228',
78  'workphone' => '', 'cellphone' => '', 'fax' => '', 'ssn' => '228-29-3342',
79  'address1' => '373 Richland Ave', 'address2' => '',
80  'city' => 'Shire', 'state' => 'ID', 'zip' => '83111', 'cc' => 'US',
81  'dob' => '1991-02-28', 'class' => '']],
82  '<HomePhone>208-555-0228</HomePhone>'],
83 
84  'business FNempty' => [['data' =>
85  ['accountnumber' => '22891',
86  'firstname' => '', 'middlename' => '','lastname' => 'Williams',
87  'email' => 'youngson@yahoo.com', 'homephone' => '208-555-0228',
88  'workphone' => '', 'cellphone' => '', 'fax' => '', 'ssn' => '228-29-3342',
89  'address1' => '373 Richland Ave', 'address2' => '',
90  'city' => 'Shire', 'state' => 'ID', 'zip' => '83111', 'cc' => 'US',
91  'dob' => '1991-02-28', 'class' => '']],
92  '<HomePhone>208-555-0228</HomePhone>'],
93 
94  'business FNpass' => [['data' =>
95  ['accountnumber' => '22891',
96  'firstname' => '', 'middlename' => '','lastname' => 'Williams',
97  'email' => 'youngson@yahoo.com', 'homephone' => '208-555-0228',
98  'workphone' => '', 'cellphone' => '', 'fax' => '', 'ssn' => '228-29-3342',
99  'address1' => '373 Richland Ave', 'address2' => '',
100  'city' => 'Shire', 'state' => 'ID', 'zip' => '83111', 'cc' => 'US',
101  'dob' => '1991-02-28', 'class' => '']],
102  '<HomePhone>208-555-0228</HomePhone>'],
103 
104  'missing birthday' => [['data' =>
105  ['accountnumber' => '22891',
106  'firstname' => 'Kevin', 'middlename' => 'O','lastname' => 'Williams',
107  'email' => 'youngson@yahoo.com', 'homephone' => '208-555-0228',
108  'workphone' => '', 'cellphone' => '', 'fax' => '', 'ssn' => '228-29-3342',
109  'address1' => '373 Richland Ave', 'address2' => '',
110  'city' => 'Shire', 'state' => 'ID', 'zip' => '83111', 'cc' => 'US',
111  'dob' => '', 'class' => 'P']],
112  '<HomePhone>208-555-0228</HomePhone>'],
113 
114  'zeros birthday' => [['data' =>
115  ['accountnumber' => '22891',
116  'firstname' => 'Kevin', 'middlename' => 'O','lastname' => 'Williams',
117  'email' => 'youngson@yahoo.com', 'homephone' => '208-555-0228',
118  'workphone' => '', 'cellphone' => '', 'fax' => '', 'ssn' => '228-29-3342',
119  'address1' => '373 Richland Ave', 'address2' => '',
120  'city' => 'Shire', 'state' => 'ID', 'zip' => '83111', 'cc' => 'US',
121  'dob' => '00-00-0000', 'class' => 'P']],
122  '<HomePhone>208-555-0228</HomePhone>'],
123 
124  'missing required' => [['data' =>
125  ['accountnumber' => '22891',
126  'firstname' => 'Kevin', 'middlename' => 'O','lastname' => 'Williams',
127  'email' => 'youngson@yahoo.com', 'homephone' => '208-555-0228',
128  'workphone' => '', 'cellphone' => '', 'fax' => '', 'ssn' => '228-29-3342',
129  'address1' => '', 'address2' => '',
130  'city' => 'Shire', 'state' => 'ID', 'zip' => '83111', 'cc' => 'US',
131  'dob' => '1991-02-28', 'class' => 'P']],
132  '<HomePhone>208-555-0228</HomePhone>'],
133 
134  'malformed email' => [['data' =>
135  ['accountnumber' => '22891',
136  'firstname' => 'Kevin', 'middlename' => 'O','lastname' => 'Williams',
137  'email' => 'youngson.yahoo.com', 'homephone' => '208-555-0228',
138  'workphone' => '', 'cellphone' => '', 'fax' => '', 'ssn' => '228-29-3342',
139  'address1' => '373 Richland Ave', 'address2' => '',
140  'city' => 'Shire', 'state' => 'ID', 'zip' => '83111', 'cc' => 'US',
141  'dob' => '1991-02-28', 'class' => 'P']],
142  '<HomePhone>208-555-0228</HomePhone>'],
143 
144  'badchar email' => [['data' =>
145  ['accountnumber' => '22891',
146  'firstname' => 'Kevin', 'middlename' => 'O','lastname' => 'Williams',
147  'email' => 'youngson#3@yahoo.com', 'homephone' => '208-555-0228',
148  'workphone' => '', 'cellphone' => '', 'fax' => '', 'ssn' => '228-29-3342',
149  'address1' => '373 Richland Ave', 'address2' => '',
150  'city' => 'Shire', 'state' => 'ID', 'zip' => '83111', 'cc' => 'US',
151  'dob' => '1991-02-28', 'class' => 'P']],
152  '<HomePhone>208-555-0228</HomePhone>'],
153 
154  'missing MIRemail' => [['data' =>
155  ['accountnumber' => '22891',
156  'firstname' => 'Kevin', 'middlename' => 'O','lastname' => 'Williams',
157  'email' => '', 'homephone' => '208-555-0228',
158  'workphone' => '', 'cellphone' => '', 'fax' => '', 'ssn' => '228-29-3342',
159  'address1' => '373 Richland Ave', 'address2' => '',
160  'city' => 'Shire', 'state' => 'ID', 'zip' => '83111', 'cc' => 'US',
161  'dob' => '1991-02-28', 'class' => 'P']],
162  '<HomePhone>208-555-0228</HomePhone>'],
163 
164  // 'malformed email no HCUcred_ml' => [['data' =>
165  // ['accountnumber' => '22891',
166  // 'firstname' => 'Kevin', 'middlename' => 'O','lastname' => 'Williams',
167  // 'email' => 'youngson.yahoo.com', 'homephone' => '208-555-0228',
168  // 'workphone' => '', 'cellphone' => '', 'fax' => '', 'ssn' => '228-29-3342',
169  // 'address1' => '373 Richland Ave', 'address2' => '',
170  // 'city' => 'Shire', 'state' => 'ID', 'zip' => '83111', 'cc' => 'US',
171  // 'dob' => '1991-02-28', 'class' => 'P']],
172  // ''],
173 
174  // 'missing MIRemail no HCUcred_ml' => [['data' =>
175  // ['accountnumber' => '22891',
176  // 'firstname' => 'Kevin', 'middlename' => 'O','lastname' => 'Williams',
177  // 'email' => '', 'homephone' => '208-555-0228',
178  // 'workphone' => '', 'cellphone' => '', 'fax' => '', 'ssn' => '228-29-3342',
179  // 'address1' => '373 Richland Ave', 'address2' => '',
180  // 'city' => 'Shire', 'state' => 'ID', 'zip' => '83111', 'cc' => 'US',
181  // 'dob' => '1991-02-28', 'class' => 'P']],
182  // '']
183 /**
184  * untested:
185  * malformed email w/o HCUcred['ml']
186  * missing email w/o HCUcred['ml']
187  * IPAYcred['enrollmicr'] true
188  * IPAYcred['enrollmicr'] true w/o HCUcred['micr']
189  * IPAYcred['enrollmicr'] true w/ invalid HCUcred['micr']
190  * missing reqMIR values other than email
191  * test BizFNdot all 3 settings
192  *
193  *
194  *
195  */
196 
197  ];
198  }

◆ test_EnrollXML_List()

IPAYEnrollTest::test_EnrollXML_List (   $MIR,
  $expected,
  $IPAYcred,
  $HCUcred 
)

@dataProvider MIRProvider @depends test_IPAYcred @depends test_HCUcred

Definition at line 49 of file IPAYEnrollTest.php.

50  {
51  $enrollXML = iPayV3EnrollXML($MIR, $IPAYcred, $HCUcred);
52  if ($expected == '') {
53  $this->assertEmpty($enrollXML['data'], 'Expected empty result is not empty',false);
54  } else {
55  $this->assertContains($expected, $enrollXML['data'], 'Expected result not found',false);
56  }
57  }

◆ test_HCUcred()

IPAYEnrollTest::test_HCUcred ( )

set up the HCU credentials array

Definition at line 33 of file IPAYEnrollTest.php.

34  {
35  $this->assertTrue(true);
36  $HCUcred = ['billpayid' => '22891',
37  'ml' => 'miki@homecu.com',
38  'micr' => null
39  ];
40  return $HCUcred;
41  }

◆ test_IPAYcred()

IPAYEnrollTest::test_IPAYcred ( )

set up the IPAY credentials array

Definition at line 18 of file IPAYEnrollTest.php.

19  {
20  $this->assertTrue(true);
21  $IPAYcred = ['ipay_instid' => '99999',
22  'ipay_iv' => 'jee9Voofa7eiphai',
23  'ipay_key' => 'vacomeehoh3oN1uY',
24  'ipay_token' => '2xx7J3+vcqPORqx5Q7uBIhLRVF7fTcxnG2S14HwkPp0=',
25  'random' => gmdate("U"),
26  'enrollmicr' => 0
27  ];
28  return $IPAYcred;
29  }

The documentation for this class was generated from the following file: