public function InspectorTest::testAssertAllStrictArrays in Drupal 9
Same name and namespace in other branches
- 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 106 - Contains \Drupal\Tests\Component\Assertion\InspectorTest.
Class
- InspectorTest
- @coversDefaultClass \Drupal\Component\Assertion\Inspector @group Assertion
Namespace
Drupal\Tests\Component\AssertionCode
public function testAssertAllStrictArrays() {
$this
->assertTrue(Inspector::assertAllStrictArrays([]));
$this
->assertTrue(Inspector::assertAllStrictArrays([
[],
[],
]));
$this
->assertFalse(Inspector::assertAllStrictArrays([
[
'foo' => 'bar',
'bar' => 'foo',
],
]));
}