You are here

public static function Braintree_TestHelper::includes in Commerce Braintree 7

15 calls to Braintree_TestHelper::includes()
Braintree_MultipleValueNodeTest::testIn_multipleValues in braintree_php/tests/integration/MultipleValueNodeTest.php
Braintree_MultipleValueNodeTest::testIn_singleValue in braintree_php/tests/integration/MultipleValueNodeTest.php
Braintree_SubscriptionSearchTest::testSearch_billingCyclesRemaing in braintree_php/tests/integration/SubscriptionSearchTest.php
Braintree_SubscriptionSearchTest::testSearch_inTrialPeriod in braintree_php/tests/integration/SubscriptionSearchTest.php
Braintree_SubscriptionSearchTest::testSearch_merchantAccountId in braintree_php/tests/integration/SubscriptionSearchTest.php

... See full list

File

braintree_php/tests/TestHelper.php, line 88

Class

Braintree_TestHelper

Code

public static function includes($collection, $targetItem) {
  foreach ($collection as $item) {
    if ($item->id == $targetItem->id) {
      return true;
    }
  }
  return false;
}