function FormattableMarkupTest::providerTestNullPlaceholder

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

Data provider for
@dataProvider providerTestNullPlaceholder @group legacy" class="local">FormattableMarkupTest::testNullPlaceholder
().

Return value

array

File

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

Class

FormattableMarkupTest
Tests the TranslatableMarkup class.

Namespace

Drupal\Tests\Component\Render

Code

public static 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.