You are here

function Braintree_SubscriptionTest::testCreate_billingDayOfMonthCanBeOverriden in Commerce Braintree 7

File

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

Class

Braintree_SubscriptionTest

Code

function testCreate_billingDayOfMonthCanBeOverriden() {
  $creditCard = Braintree_SubscriptionTestHelper::createCreditCard();
  $plan = Braintree_SubscriptionTestHelper::billingDayOfMonthPlan();
  $result = Braintree_Subscription::create(array(
    'paymentMethodToken' => $creditCard->token,
    'planId' => $plan['id'],
    'billingDayOfMonth' => 14,
  ));
  $subscription = $result->subscription;
  $this
    ->assertEquals(14, $subscription->billingDayOfMonth);
}