function RendererTest::providerRenderTwice

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::providerRenderTwice()
  2. 8.9.x core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::providerRenderTwice()
  3. 10 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 669

Class

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

Namespace

Drupal\Tests\Core\Render

Code

public static 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',
                        ],
                    ],
                ],
            ],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.