You are here

class SafeMarkupTestMarkup in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php \Drupal\KernelTests\Core\Theme\SafeMarkupTestMarkup

Implements MarkupInterface without implementing \Countable.

Hierarchy

Expanded class hierarchy of SafeMarkupTestMarkup

File

core/tests/Drupal/KernelTests/Core/Theme/TwigMarkupInterfaceTest.php, line 103
Contains \Drupal\KernelTests\Core\Theme\TwigMarkupInterfaceTest.

Namespace

Drupal\KernelTests\Core\Theme
View source
class SafeMarkupTestMarkup implements MarkupInterface {
  use MarkupTrait;

  /**
   * Overrides MarkupTrait::create() to allow creation with empty strings.
   */
  public static function create($string) {
    $object = new static();
    $object->string = $string;
    return $object;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MarkupTrait::$string protected property The safe string.
MarkupTrait::count public function Returns the string length.
MarkupTrait::jsonSerialize public function Returns a representation of the object for use in JSON serialization.
MarkupTrait::__toString public function Returns the string version of the Markup object.
SafeMarkupTestMarkup::create public static function Overrides MarkupTrait::create() to allow creation with empty strings. Overrides MarkupTrait::create