function VariableTest::testCallableToString
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/Utility/VariableTest.php \Drupal\Tests\Component\Utility\VariableTest::testCallableToString()
- 11.x core/tests/Drupal/Tests/Component/Utility/VariableTest.php \Drupal\Tests\Component\Utility\VariableTest::testCallableToString()
Tests generating a human-readable name for a callable.
@dataProvider providerCallableToString
@covers ::callableToString
Parameters
callable $callable: A callable.
string $expected_name: The expected human-readable name of the callable.
File
-
core/
tests/ Drupal/ Tests/ Component/ Utility/ VariableTest.php, line 82
Class
- VariableTest
- Test variable export functionality in Variable component.
Namespace
Drupal\Tests\Component\UtilityCode
public function testCallableToString($callable, string $expected_name) : void {
$this->assertSame($expected_name, Variable::callableToString($callable));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.