public function InspectorTest::testAllCallable in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php \Drupal\Tests\Component\Assertion\InspectorTest::testAllCallable()
Tests asserting all members are callable.
@covers ::assertAllCallable
File
- core/
tests/ Drupal/ Tests/ Component/ Assertion/ InspectorTest.php, line 154 - Contains \Drupal\Tests\Component\Assertion\InspectorTest.
Class
- InspectorTest
- @coversDefaultClass \Drupal\Component\Assertion\Inspector @group Inspector
Namespace
Drupal\Tests\Component\AssertionCode
public function testAllCallable() {
$this
->assertTrue(Inspector::assertAllCallable([
'strchr',
[
$this,
'callMe',
],
[
__CLASS__,
'callMeStatic',
],
function () {
return TRUE;
},
]));
$this
->assertFalse(Inspector::assertAllCallable([
'strchr',
[
$this,
'callMe',
],
[
__CLASS__,
'callMeStatic',
],
function () {
return TRUE;
},
"I'm not callable",
]));
}