You are here

protected function AcquiaConnectorSpiTest::isContainObjects in Acquia Connector 8

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/AcquiaConnectorSpiTest.php \Drupal\Tests\acquia_connector\Functional\AcquiaConnectorSpiTest::isContainObjects()
  2. 3.x tests/src/Functional/AcquiaConnectorSpiTest.php \Drupal\Tests\acquia_connector\Functional\AcquiaConnectorSpiTest::isContainObjects()

Helper function determines whether given array contains PHP object.

1 call to AcquiaConnectorSpiTest::isContainObjects()
AcquiaConnectorSpiTest::testNoObjectInSpiDataTests in tests/src/Functional/AcquiaConnectorSpiTest.php
Validate Acquia SPI data.

File

tests/src/Functional/AcquiaConnectorSpiTest.php, line 613

Class

AcquiaConnectorSpiTest
Tests the functionality of the Acquia SPI module.

Namespace

Drupal\Tests\acquia_connector\Functional

Code

protected function isContainObjects($arr) {
  foreach ($arr as $item) {
    if (is_object($item)) {
      return TRUE;
    }
    if (is_array($item) && $this
      ->isContainObjects($item)) {
      return TRUE;
    }
  }
  return FALSE;
}