@@ -236,6 +236,13 @@ public function testExpiryYearTwoDigits()
236
236
$ this ->assertSame (2012 , $ this ->card ->getExpiryYear ());
237
237
}
238
238
239
+ public function testExpiryDate ()
240
+ {
241
+ $ this ->assertSame ($ this ->card , $ this ->card ->setExpiryMonth ('09 ' ));
242
+ $ this ->assertSame ($ this ->card , $ this ->card ->setExpiryYear ('2012 ' ));
243
+ $ this ->assertSame ('092012 ' , $ this ->card ->getExpiryDate ('mY ' ));
244
+ }
245
+
239
246
public function testStartMonth ()
240
247
{
241
248
$ this ->card ->setStartMonth (9 );
@@ -279,6 +286,20 @@ public function testIssueNumber()
279
286
$ this ->assertSame ('12 ' , $ this ->card ->getIssueNumber ());
280
287
}
281
288
289
+ public function testBillingFirstName ()
290
+ {
291
+ $ this ->card ->setBillingFirstName ('Bob ' );
292
+ $ this ->assertEquals ('Bob ' , $ this ->card ->getBillingFirstName ());
293
+ $ this ->assertEquals ('Bob ' , $ this ->card ->getFirstName ());
294
+ }
295
+
296
+ public function testBillingLastName ()
297
+ {
298
+ $ this ->card ->setBillingLastName ('Smith ' );
299
+ $ this ->assertEquals ('Smith ' , $ this ->card ->getBillingLastName ());
300
+ $ this ->assertEquals ('Smith ' , $ this ->card ->getLastName ());
301
+ }
302
+
282
303
public function testBillingName ()
283
304
{
284
305
$ this ->card ->setBillingFirstName ('Bob ' );
@@ -290,6 +311,13 @@ public function testBillingName()
290
311
$ this ->assertEquals ('Foo ' , $ this ->card ->getBillingLastName ());
291
312
}
292
313
314
+ public function testBillingCompany ()
315
+ {
316
+ $ this ->card ->setBillingCompany ('SuperSoft ' );
317
+ $ this ->assertEquals ('SuperSoft ' , $ this ->card ->getBillingCompany ());
318
+ $ this ->assertEquals ('SuperSoft ' , $ this ->card ->getCompany ());
319
+ }
320
+
293
321
public function testBillingAddress1 ()
294
322
{
295
323
$ this ->card ->setBillingAddress1 ('31 Spooner St ' );
@@ -339,17 +367,6 @@ public function testBillingPhone()
339
367
$ this ->assertSame ('12345 ' , $ this ->card ->getPhone ());
340
368
}
341
369
342
- public function testShippingName ()
343
- {
344
- $ this ->card ->setShippingFirstName ('Bob ' );
345
- $ this ->card ->setShippingLastName ('Smith ' );
346
- $ this ->assertEquals ('Bob Smith ' , $ this ->card ->getShippingName ());
347
-
348
- $ this ->card ->setShippingName ('John Foo ' );
349
- $ this ->assertEquals ('John ' , $ this ->card ->getShippingFirstName ());
350
- $ this ->assertEquals ('Foo ' , $ this ->card ->getShippingLastName ());
351
- }
352
-
353
370
public function testShippingFirstName ()
354
371
{
355
372
$ this ->card ->setShippingFirstName ('James ' );
@@ -362,6 +379,17 @@ public function testShippingLastName()
362
379
$ this ->assertEquals ('Doctor ' , $ this ->card ->getShippingLastName ());
363
380
}
364
381
382
+ public function testShippingName ()
383
+ {
384
+ $ this ->card ->setShippingFirstName ('Bob ' );
385
+ $ this ->card ->setShippingLastName ('Smith ' );
386
+ $ this ->assertEquals ('Bob Smith ' , $ this ->card ->getShippingName ());
387
+
388
+ $ this ->card ->setShippingName ('John Foo ' );
389
+ $ this ->assertEquals ('John ' , $ this ->card ->getShippingFirstName ());
390
+ $ this ->assertEquals ('Foo ' , $ this ->card ->getShippingLastName ());
391
+ }
392
+
365
393
public function testShippingCompany ()
366
394
{
367
395
$ this ->card ->setShippingCompany ('SuperSoft ' );
@@ -410,6 +438,14 @@ public function testShippingPhone()
410
438
$ this ->assertEquals ('12345 ' , $ this ->card ->getShippingPhone ());
411
439
}
412
440
441
+ public function testCompany ()
442
+ {
443
+ $ this ->card ->setCompany ('FooBar ' );
444
+ $ this ->assertEquals ('FooBar ' , $ this ->card ->getCompany ());
445
+ $ this ->assertEquals ('FooBar ' , $ this ->card ->getBillingCompany ());
446
+ $ this ->assertEquals ('FooBar ' , $ this ->card ->getShippingCompany ());
447
+ }
448
+
413
449
public function testAddress1 ()
414
450
{
415
451
$ this ->card ->setAddress1 ('31 Spooner St ' );
@@ -466,12 +502,6 @@ public function testPhone()
466
502
$ this ->assertEquals ('12345 ' , $ this ->card ->getShippingPhone ());
467
503
}
468
504
469
- public function testCompany ()
470
- {
471
- $ this ->card ->setCompany ('FooBar ' );
472
- $ this ->assertEquals ('FooBar ' , $ this ->card ->getCompany ());
473
- }
474
-
475
505
public function testEmail ()
476
506
{
477
507
$ this ->
card ->
setEmail (
'[email protected] ' );
0 commit comments