public function testDelete() { $paymentMethodToken = 'PAYPALToken-' . strval(rand()); $customer = Braintree\Customer::createNoValidate(); $http = new HttpClientApi(Braintree\Configuration::$global); $nonce = $http->nonceForPayPalAccount(['paypal_account' => ['consent_code' => 'PAYPAL_CONSENT_CODE', 'token' => $paymentMethodToken]]); Braintree\PaymentMethod::create(['customerId' => $customer->id, 'paymentMethodNonce' => $nonce]); Braintree\PayPalAccount::delete($paymentMethodToken); $this->setExpectedException('Braintree\\Exception\\NotFound'); Braintree\PayPalAccount::find($paymentMethodToken); }
public function testErrorsOnFindWithWhitespaceCharacterArgument() { $this->setExpectedException('InvalidArgumentException'); Braintree\PayPalAccount::find('\\t'); }