function InspectorTest::testAssertAllStringable
Tests asserting all members are strings or objects with __toString().
@covers ::assertAllStringable
      
    
File
- 
              core/
tests/ Drupal/ Tests/ Component/ Assertion/ InspectorTest.php, line 75  
Class
- InspectorTest
 - @coversDefaultClass \Drupal\Component\Assertion\Inspector[[api-linebreak]] @group Assertion
 
Namespace
Drupal\Tests\Component\AssertionCode
public function testAssertAllStringable() : void {
  $this->assertTrue(Inspector::assertAllStringable([]));
  $this->assertTrue(Inspector::assertAllStringable([
    'foo',
    'bar',
  ]));
  $this->assertFalse(Inspector::assertAllStringable('foo'));
  $this->assertTrue(Inspector::assertAllStringable([
    'foo',
    new StringObject(),
  ]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.