function InspectorTest::testAssertStrictArray
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php \Drupal\Tests\Component\Assertion\InspectorTest::testAssertStrictArray()
- 8.9.x core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php \Drupal\Tests\Component\Assertion\InspectorTest::testAssertStrictArray()
- 10 core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php \Drupal\Tests\Component\Assertion\InspectorTest::testAssertStrictArray()
Tests asserting array is 0-indexed - the strict definition of array.
@covers ::assertStrictArray
File
-
core/
tests/ Drupal/ Tests/ Component/ Assertion/ InspectorTest.php, line 83
Class
- InspectorTest
- @coversDefaultClass \Drupal\Component\Assertion\Inspector @group Assertion
Namespace
Drupal\Tests\Component\AssertionCode
public function testAssertStrictArray() : void {
$this->assertTrue(Inspector::assertStrictArray([]));
$this->assertTrue(Inspector::assertStrictArray([
'bar',
'foo',
]));
$this->assertFalse(Inspector::assertStrictArray([
'foo' => 'bar',
'bar' => 'foo',
]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.