public function HtmlEscapedTextTest::testCount in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Component/Render/HtmlEscapedTextTest.php \Drupal\Tests\Component\Render\HtmlEscapedTextTest::testCount()
- 9 core/tests/Drupal/Tests/Component/Render/HtmlEscapedTextTest.php \Drupal\Tests\Component\Render\HtmlEscapedTextTest::testCount()
@covers ::count
File
- core/
tests/ Drupal/ Tests/ Component/ Render/ HtmlEscapedTextTest.php, line 58
Class
- HtmlEscapedTextTest
- Tests the HtmlEscapedText class.
Namespace
Drupal\Tests\Component\RenderCode
public function testCount() {
$string = 'Can I please have a <em>kitten</em>';
$escapable_string = new HtmlEscapedText($string);
$this
->assertEquals(strlen($string), $escapable_string
->count());
}