You are here

function Braintree_SubscriptionTest::testCreate_priceCanBeOverriden in Commerce Braintree 7

File

braintree_php/tests/integration/SubscriptionTest.php, line 189

Class

Braintree_SubscriptionTest

Code

function testCreate_priceCanBeOverriden() {
  $creditCard = Braintree_SubscriptionTestHelper::createCreditCard();
  $plan = Braintree_SubscriptionTestHelper::trialPlan();
  $result = Braintree_Subscription::create(array(
    'paymentMethodToken' => $creditCard->token,
    'planId' => $plan['id'],
    'price' => '2.00',
  ));
  $subscription = $result->subscription;
  $this
    ->assertEquals('2.00', $subscription->price);
}