You are here

function Braintree_SubscriptionTest::testCreate_removePlanTrialPeriod in Commerce Braintree 7

File

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

Class

Braintree_SubscriptionTest

Code

function testCreate_removePlanTrialPeriod() {
  $creditCard = Braintree_SubscriptionTestHelper::createCreditCard();
  $plan = Braintree_SubscriptionTestHelper::trialPlan();
  $result = Braintree_Subscription::create(array(
    'paymentMethodToken' => $creditCard->token,
    'planId' => $plan['id'],
    'trialPeriod' => false,
  ));
  $subscription = $result->subscription;
  $this
    ->assertFalse($subscription->trialPeriod);
}