function NestedArrayTest::testFilter

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php \Drupal\Tests\Component\Utility\NestedArrayTest::testFilter()
  2. 10 core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php \Drupal\Tests\Component\Utility\NestedArrayTest::testFilter()
  3. 11.x core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php \Drupal\Tests\Component\Utility\NestedArrayTest::testFilter()

@covers ::filter @dataProvider providerTestFilter

File

core/tests/Drupal/Tests/Component/Utility/NestedArrayTest.php, line 261

Class

NestedArrayTest
@coversDefaultClass \Drupal\Component\Utility\NestedArray @group Utility

Namespace

Drupal\Tests\Component\Utility

Code

public function testFilter($array, $callable, $expected) {
    $this->assertEquals($expected, NestedArray::filter($array, $callable));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.