You are here

public function RendererBubblingTest::providerTestBubblingWithPrerender in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php \Drupal\Tests\Core\Render\RendererBubblingTest::providerTestBubblingWithPrerender()
  2. 9 core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php \Drupal\Tests\Core\Render\RendererBubblingTest::providerTestBubblingWithPrerender()

Provides two test elements: one without, and one with the theme system.

Return value

array

File

core/tests/Drupal/Tests/Core/Render/RendererBubblingTest.php, line 589
Contains \Drupal\Tests\Core\Render\RendererBubblingTest.

Class

RendererBubblingTest
@coversDefaultClass \Drupal\Core\Render\Renderer @group Render

Namespace

Drupal\Tests\Core\Render

Code

public function providerTestBubblingWithPrerender() {
  $data = [];

  // Test element without theme.
  $data[] = [
    [
      'foo' => [
        '#pre_render' => [
          __NAMESPACE__ . '\\BubblingTest::bubblingPreRender',
        ],
      ],
    ],
  ];

  // Test element with theme.
  $data[] = [
    [
      '#theme' => 'common_test_render_element',
      'foo' => [
        '#pre_render' => [
          __NAMESPACE__ . '\\BubblingTest::bubblingPreRender',
        ],
      ],
    ],
  ];
  return $data;
}