CreditCardVerificationTest.php 747 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Test\Unit;
  3. require_once dirname(__DIR__) . '/Setup.php';
  4. use Test\Setup;
  5. use Braintree;
  6. class CreditCardVerificationTest extends Setup
  7. {
  8. public function test_createWithInvalidArguments()
  9. {
  10. $this->setExpectedException('InvalidArgumentException', 'invalid keys: invalidProperty');
  11. Braintree\CreditCardVerification::create(['options' => ['amount' => '123.45'], 'invalidProperty' => 'foo']);
  12. }
  13. public function test_createWithPaymentMethodArguments()
  14. {
  15. $this->setExpectedException('InvalidArgumentException', 'invalid keys: creditCard[venmoSdkPaymentMethodCode]');
  16. Braintree\CreditCardVerification::create(['options' => ['amount' => '123.45'], 'creditCard' => ['venmoSdkPaymentMethodCode' => 'foo']]);
  17. }
  18. }