public function HtmlEscapedTextTest::testCount in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 63 
- Contains \Drupal\Tests\Component\Render\HtmlEscapedTextTest.
Class
- HtmlEscapedTextTest
- Tests the HtmlEscapedText class.
Namespace
Drupal\Tests\Component\RenderCode
public function testCount() {
  $string = 'Can I please have a <em>kitten</em>';
  $escapeable_string = new HtmlEscapedText($string);
  $this
    ->assertEquals(strlen($string), $escapeable_string
    ->count());
}