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'); }
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'); }