You are here

protected function TocTest::dumpArraySubsetUnset in TOC API 8

Unsets unwanted array properties.

Parameters

array $array: A TOC index or tree.

1 call to TocTest::dumpArraySubsetUnset()
TocTest::dumpArraySubset in tests/src/Unit/TocTest.php
Dumps TOC array into $this->assertArraySubset() assertion.

File

tests/src/Unit/TocTest.php, line 482
Contains \Drupal\Tests\toc_api\Unit\TocTest.

Class

TocTest
Tests TOC API formatter.

Namespace

Drupal\Tests\toc_api\Unit

Code

protected function dumpArraySubsetUnset(array &$array) {
  foreach ($array as &$value) {
    if (!is_array($value)) {
      continue;
    }
    if (isset($value['html'])) {
      unset($value['html']);
    }
    if (isset($value['url'])) {
      unset($value['url']);
    }
    $this
      ->dumpArraySubsetUnset($value);
  }
}