public function TwigExtensionTest::providerTestAddFilter in Components! 8.2
Same name and namespace in other branches
- 3.x tests/src/Kernel/TwigExtensionTest.php \Drupal\Tests\components\Kernel\TwigExtensionTest::providerTestAddFilter()
Data provider for testAddFilter().
See also
testAddFilter()
File
- tests/
src/ Kernel/ TwigExtensionTest.php, line 215
Class
- TwigExtensionTest
- @coversDefaultClass \Drupal\components\Template\TwigExtension @group components
Namespace
Drupal\Tests\components\KernelCode
public function providerTestAddFilter() : array {
return [
'Uses positional arguments' => [
'theme_hook' => 'components_twig_extension_test_add_filter',
'expected' => '<div class="original-container-class new-class"></div>',
],
'Uses named arguments' => [
'theme_hook' => 'components_twig_extension_test_add_filter_named_arguments',
'expected' => '<div class="original-container-class new-class"></div>',
],
'Uses "values" named argument' => [
'theme_hook' => 'components_twig_extension_test_add_filter_plural_named_arguments',
'expected' => '<div class="original-container-class new-class-1 new-class-2"></div>',
],
'Uses deprecated "path" named argument' => [
'theme_hook' => 'components_twig_extension_test_add_filter_deprecated_named_arguments',
'expected' => '<div class="original-container-class new-class"></div>',
],
];
}