public function TwigExtensionTest::providerTestAddFilter in Components! 3.x
Same name and namespace in other branches
- 8.2 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 182
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>',
],
];
}