function FormattableMarkupTest::providerTestNullPlaceholder

Same name in other branches
  1. 10 core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php \Drupal\Tests\Component\Render\FormattableMarkupTest::providerTestNullPlaceholder()

Data provider for FormattableMarkupTest::testNullPlaceholder().

Return value

array

File

core/tests/Drupal/Tests/Component/Render/FormattableMarkupTest.php, line 70

Class

FormattableMarkupTest
Tests the TranslatableMarkup class.

Namespace

Drupal\Tests\Component\Render

Code

public function providerTestNullPlaceholder() {
    return [
        [
            '',
            '@empty',
            [
                '@empty' => NULL,
            ],
            'Deprecated NULL placeholder value for key (@empty) in: "@empty". This will throw a PHP error in drupal:11.0.0. See https://www.drupal.org/node/3318826',
        ],
        [
            '',
            ':empty',
            [
                ':empty' => NULL,
            ],
            'Deprecated NULL placeholder value for key (:empty) in: ":empty". This will throw a PHP error in drupal:11.0.0. See https://www.drupal.org/node/3318826',
        ],
        [
            '<em class="placeholder"></em>',
            '%empty',
            [
                '%empty' => NULL,
            ],
            'Deprecated NULL placeholder value for key (%%empty) in: "%%empty". This will throw a PHP error in drupal:11.0.0. See https://www.drupal.org/node/3318826',
        ],
    ];
}

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