public function testCreditNoValidate_throwsIfInvalid() { $customer = Braintree\Customer::createNoValidate(array('creditCard' => array('number' => '5105105105105100', 'expirationDate' => '05/12'))); $creditCard = $customer->creditCards[0]; $this->setExpectedException('Braintree\\Exception\\ValidationsFailed'); Braintree\CreditCard::creditNoValidate($creditCard->token, array('amount' => 'invalid')); }