function 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 98  
Class
- InspectorTest
 - @coversDefaultClass \Drupal\Component\Assertion\Inspector[[api-linebreak]] @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.