function Braintree_SubscriptionTest::testUpdate_canUpdateNumberOfBillingCycles in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ SubscriptionTest.php, line 645
Class
Code
function testUpdate_canUpdateNumberOfBillingCycles() {
$plan = Braintree_SubscriptionTestHelper::triallessPlan();
$subscription = Braintree_SubscriptionTestHelper::createSubscription();
$this
->assertEquals($plan['numberOfBillingCycles'], $subscription->numberOfBillingCycles);
$updatedSubscription = Braintree_Subscription::update($subscription->id, array(
'numberOfBillingCycles' => 15,
))->subscription;
$this
->assertEquals(15, $updatedSubscription->numberOfBillingCycles);
}