function VariableTest::testCallableToString

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/VariableTest.php \Drupal\Tests\Component\Utility\VariableTest::testCallableToString()
  2. 10 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\Utility

Code

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.