You are here

public function RendererTest::providerRenderTwice in Drupal 10

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

Provides a list of render array iterations.

Return value

array

File

core/tests/Drupal/Tests/Core/Render/RendererTest.php, line 666
Contains \Drupal\Tests\Core\Render\RendererTest.

Class

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

Namespace

Drupal\Tests\Core\Render

Code

public function providerRenderTwice() {
  return [
    [
      [
        '#markup' => 'kittens',
        '#cache' => [
          'tags' => [
            'kittens-147',
          ],
        ],
      ],
    ],
    [
      [
        'child' => [
          '#markup' => 'kittens',
          '#cache' => [
            'tags' => [
              'kittens-147',
            ],
          ],
        ],
      ],
    ],
    [
      [
        '#render_children' => TRUE,
        'child' => [
          '#markup' => 'kittens',
          '#cache' => [
            'tags' => [
              'kittens-147',
            ],
          ],
        ],
      ],
    ],
  ];
}