public function TwigExtensionTest::providerTestSetFilter in Components! 8.2
Same name and namespace in other branches
- 3.x tests/src/Kernel/TwigExtensionTest.php \Drupal\Tests\components\Kernel\TwigExtensionTest::providerTestSetFilter()
Data provider for testSetFilter().
See also
testSetFilter()
File
- tests/
src/ Kernel/ TwigExtensionTest.php, line 146
Class
- TwigExtensionTest
- @coversDefaultClass \Drupal\components\Template\TwigExtension @group components
Namespace
Drupal\Tests\components\KernelCode
public function providerTestSetFilter() : array {
return [
'Uses positional arguments' => [
'theme_hook' => 'components_twig_extension_test_set_filter',
'expected' => '<div class="new-class"></div>',
],
'Uses named arguments' => [
'theme_hook' => 'components_twig_extension_test_set_filter_named_arguments',
'expected' => '<div class="new-class"></div>',
],
'Uses deprecated "path" named argument' => [
'theme_hook' => 'components_twig_extension_test_set_filter_deprecated_named_arguments',
'expected' => '<div class="new-class"></div>',
],
'Uses deprecated "array" named argument' => [
'theme_hook' => 'components_twig_extension_test_set_filter_deprecated_named_argument',
'expected' => '<div id="the_element_id" class="new-class"></div>',
],
];
}