public function testCardNumberException() { $card = new dwmsw\sagepay\Card(); try { $card->setCardNumber('Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live.'); } catch (InvalidArgumentException $e) { return; } $this->fail('Allowed an input that was too long'); }