You are here

public function TwigExtensionTest::providerTestRecursiveMergeFilter in Components! 8.2

Same name and namespace in other branches
  1. 3.x tests/src/Kernel/TwigExtensionTest.php \Drupal\Tests\components\Kernel\TwigExtensionTest::providerTestRecursiveMergeFilter()

Data provider for testRecursiveMergeFilter().

See also

testRecursiveMergeFilter()

File

tests/src/Kernel/TwigExtensionTest.php, line 90

Class

TwigExtensionTest
@coversDefaultClass \Drupal\components\Template\TwigExtension @group components

Namespace

Drupal\Tests\components\Kernel

Code

public function providerTestRecursiveMergeFilter() : array {
  return [
    'Uses positional arguments' => [
      'theme_hook' => 'components_twig_extension_test_recursive_merge_filter',
      'expected' => '<div id="the_element_id" class="new-class"></div>',
    ],
    'Uses named arguments' => [
      'theme_hook' => 'components_twig_extension_test_recursive_merge_filter_named_arguments',
      'expected' => '<div id="the_element_id" class="new-class"></div>',
    ],
  ];
}