class TextWrapper in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/Utility/TextWrapper.php \Drupal\Tests\Component\Utility\TextWrapper
Used by SafeMarkupTest to test that a class with a __toString() method works.
Hierarchy
- class \Drupal\Tests\Component\Utility\TextWrapper
Expanded class hierarchy of TextWrapper
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ TextWrapper.php, line 12 - Contains \Drupal\Tests\Component\Utility\TextWrapper.
Namespace
Drupal\Tests\Component\UtilityView source
class TextWrapper {
/**
* The text value.
*
* @var string
*/
protected $text = '';
/**
* Constructs a \Drupal\Tests\Component\Utility\TextWrapper
*
* @param string $text
*/
public function __construct($text) {
$this->text = $text;
}
/**
* Magic method
*
* @return string
*/
public function __toString() {
return $this->text;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TextWrapper:: |
protected | property | The text value. | |
TextWrapper:: |
public | function | Constructs a \Drupal\Tests\Component\Utility\TextWrapper | |
TextWrapper:: |
public | function | Magic method |