Example #1
0
 public function testCardTypeException()
 {
     // New card instance
     $card = new Card();
     try {
         // Card details
         $card->setCardType('NOCARDTYPE');
     } catch (InvalidArgumentException $expected) {
         return;
     }
     $this->fail('Card excepted a random card type');
 }
Example #2
0
 public function testExpiryDateException()
 {
     $card = new dwmsw\sagepay\Card();
     try {
         $card->setExpiryDate('44555');
     } catch (InvalidArgumentException $e) {
         return;
     }
     $this->fail('Allowed an input that was too formatted incorrectly');
 }