function Braintree_SubscriptionTest::testCreate_trialPeriodDefaultsToPlanWithoutTrial in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ SubscriptionTest.php, line 89
Class
Code
function testCreate_trialPeriodDefaultsToPlanWithoutTrial() {
$creditCard = Braintree_SubscriptionTestHelper::createCreditCard();
$plan = Braintree_SubscriptionTestHelper::triallessPlan();
$result = Braintree_Subscription::create(array(
'paymentMethodToken' => $creditCard->token,
'planId' => $plan['id'],
));
$subscription = $result->subscription;
$this
->assertFalse($subscription->trialPeriod);
$this
->assertNull($subscription->trialDuration);
$this
->assertNull($subscription->trialDurationUnit);
}