function PlaceholderGeneratorTest::providerCreatePlaceholderGeneratesValidHtmlMarkup

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

Return value

array

File

core/tests/Drupal/Tests/Core/Render/PlaceholderGeneratorTest.php, line 86

Class

PlaceholderGeneratorTest
@coversDefaultClass \Drupal\Core\Render\PlaceholderGenerator @group Render

Namespace

Drupal\Tests\Core\Render

Code

public function providerCreatePlaceholderGeneratesValidHtmlMarkup() {
    return [
        'multiple-arguments' => [
            [
                '#lazy_builder' => [
                    'Drupal\\Tests\\Core\\Render\\PlaceholdersTest::callback',
                    [
                        'foo',
                        'bar',
                    ],
                ],
            ],
        ],
        'special-character-&' => [
            [
                '#lazy_builder' => [
                    'Drupal\\Tests\\Core\\Render\\PlaceholdersTest::callback',
                    [
                        'foo&bar',
                    ],
                ],
            ],
        ],
        'special-character-"' => [
            [
                '#lazy_builder' => [
                    'Drupal\\Tests\\Core\\Render\\PlaceholdersTest::callback',
                    [
                        'foo"bar',
                    ],
                ],
            ],
        ],
        'special-character-<' => [
            [
                '#lazy_builder' => [
                    'Drupal\\Tests\\Core\\Render\\PlaceholdersTest::callback',
                    [
                        'foo<bar',
                    ],
                ],
            ],
        ],
        'special-character->' => [
            [
                '#lazy_builder' => [
                    'Drupal\\Tests\\Core\\Render\\PlaceholdersTest::callback',
                    [
                        'foo>bar',
                    ],
                ],
            ],
        ],
    ];
}

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