You are here

public function InspectorTest::testAssertAllStrictArrays in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php \Drupal\Tests\Component\Assertion\InspectorTest::testAssertAllStrictArrays()

Tests asserting all members are strict arrays.

@covers ::assertAllStrictArrays

File

core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php, line 105
Contains \Drupal\Tests\Component\Assertion\InspectorTest.

Class

InspectorTest
@coversDefaultClass \Drupal\Component\Assertion\Inspector @group Inspector

Namespace

Drupal\Tests\Component\Assertion

Code

public function testAssertAllStrictArrays() {
  $this
    ->assertTrue(Inspector::assertAllStrictArrays([]));
  $this
    ->assertTrue(Inspector::assertAllStrictArrays([
    [],
    [],
  ]));
  $this
    ->assertFalse(Inspector::assertAllStrictArrays([
    [
      'foo' => 'bar',
      'bar' => 'foo',
    ],
  ]));
}