function RendererTest::providerTestRenderCacheProperties

Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::providerTestRenderCacheProperties()
  2. 10 core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::providerTestRenderCacheProperties()
  3. 11.x core/tests/Drupal/Tests/Core/Render/RendererTest.php \Drupal\Tests\Core\Render\RendererTest::providerTestRenderCacheProperties()

Data provider for ::testRenderCacheProperties().

Return value

array An array of associative arrays of expected results keyed by property name.

File

core/tests/Drupal/Tests/Core/Render/RendererTest.php, line 949

Class

RendererTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Render%21Renderer.php/class/Renderer/9" title="Turns a render array into an HTML string." class="local">\Drupal\Core\Render\Renderer</a> @group Render

Namespace

Drupal\Tests\Core\Render

Code

public function providerTestRenderCacheProperties() {
    return [
        [
            [],
        ],
        [
            [
                'child1' => 0,
                'child2' => 0,
                '#custom_property' => 0,
                '#custom_property_array' => 0,
            ],
        ],
        [
            [
                'child1' => 0,
                'child2' => 0,
                '#custom_property' => 1,
                '#custom_property_array' => 0,
            ],
        ],
        [
            [
                'child1' => 0,
                'child2' => 1,
                '#custom_property' => 0,
                '#custom_property_array' => 0,
            ],
        ],
        [
            [
                'child1' => 0,
                'child2' => 1,
                '#custom_property' => 1,
                '#custom_property_array' => 0,
            ],
        ],
        [
            [
                'child1' => 1,
                'child2' => 0,
                '#custom_property' => 0,
                '#custom_property_array' => 0,
            ],
        ],
        [
            [
                'child1' => 1,
                'child2' => 0,
                '#custom_property' => 1,
                '#custom_property_array' => 0,
            ],
        ],
        [
            [
                'child1' => 1,
                'child2' => 1,
                '#custom_property' => 0,
                '#custom_property_array' => 0,
            ],
        ],
        [
            [
                'child1' => 1,
                'child2' => 1,
                '#custom_property' => 1,
                '#custom_property_array' => 0,
            ],
        ],
        [
            [
                'child1' => 1,
                'child2' => 1,
                '#custom_property' => 1,
                '#custom_property_array' => 1,
            ],
        ],
    ];
}

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