Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php \Drupal\Tests\Core\Template\TwigExtensionTest::providerTestRenderVarEarlyReturn()
Data provider for ::testRenderVarEarlyReturn().
File
- core/
tests/ Drupal/ Tests/ Core/ Template/ TwigExtensionTest.php, line 380
Class
- TwigExtensionTest
- Tests the twig extension.
Namespace
Drupal\Tests\Core\TemplateCode
public static function providerTestRenderVarEarlyReturn() {
return [
'null' => [
'',
NULL,
],
'empty array' => [
'',
[],
],
'float zero' => [
0,
0.0,
],
'float non-zero' => [
10.0,
10.0,
],
'int zero' => [
0,
0,
],
'int non-zero' => [
10,
10,
],
'empty string' => [
'',
'',
],
'string' => [
'test',
'test',
],
'FALSE' => [
'',
FALSE,
],
'TRUE' => [
TRUE,
TRUE,
],
];
}