function Braintree_SubscriptionTest::testUpdate_createsProratedTransactionWhenFlagIsPassedTrue in Commerce Braintree 7
File
- braintree_php/
tests/ integration/ SubscriptionTest.php, line 679
Class
Code
function testUpdate_createsProratedTransactionWhenFlagIsPassedTrue() {
$subscription = Braintree_SubscriptionTestHelper::createSubscription();
$result = Braintree_Subscription::update($subscription->id, array(
'price' => $subscription->price + 1,
'options' => array(
'prorateCharges' => true,
),
));
$this
->assertTrue($result->success);
$this
->assertEquals(sizeof($subscription->transactions) + 1, sizeof($result->subscription->transactions));
}