You are here

function Braintree_SubscriptionTest::testUpdate_createsTransactionOnProration in Commerce Braintree 7

File

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

Class

Braintree_SubscriptionTest

Code

function testUpdate_createsTransactionOnProration() {
  $subscription = Braintree_SubscriptionTestHelper::createSubscription();
  $result = Braintree_Subscription::update($subscription->id, array(
    'price' => $subscription->price + 1,
  ));
  $this
    ->assertTrue($result->success);
  $this
    ->assertEquals(sizeof($subscription->transactions) + 1, sizeof($result->subscription->transactions));
}