public function VariableTest::testCallableToString in Drupal 9
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 91 - Contains \Drupal\Tests\Component\Utility\VariableTest.
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));
}