You are here

function Braintree_SubscriptionSearchTest::testSearch_statusIsExpired in Commerce Braintree 7

File

braintree_php/tests/integration/SubscriptionSearchTest.php, line 96

Class

Braintree_SubscriptionSearchTest

Code

function testSearch_statusIsExpired() {
  $found = false;
  $collection = Braintree_Subscription::search(array(
    Braintree_SubscriptionSearch::status()
      ->in(array(
      Braintree_Subscription::EXPIRED,
    )),
  ));
  foreach ($collection as $item) {
    $found = true;
    $this
      ->assertEquals(Braintree_Subscription::EXPIRED, $item->status);
  }
  $this
    ->assertTrue($found);
}