function SafeMarkupTestMarkup::create

Same name in other branches
  1. 8.9.x core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php \Drupal\KernelTests\Core\Theme\SafeMarkupTestMarkup::create()
  2. 10 core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php \Drupal\KernelTests\Core\Theme\SafeMarkupTestMarkup::create()
  3. 11.x core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php \Drupal\KernelTests\Core\Theme\SafeMarkupTestMarkup::create()

Overrides MarkupTrait::create() to allow creation with empty strings.

Overrides MarkupTrait::create

1 call to SafeMarkupTestMarkup::create()
TwigMarkupInterfaceTest::providerTestMarkupInterfaceEmpty in core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php
Provide test examples.

File

core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php, line 109

Class

SafeMarkupTestMarkup
Implements MarkupInterface without implementing \Countable.

Namespace

Drupal\KernelTests\Core\Theme

Code

public static function create($string) {
    $object = new static();
    $object->string = $string;
    return $object;
}

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