function SafeMarkupTest::testCheckPlain in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/Utility/SafeMarkupTest.php \Drupal\Tests\Component\Utility\SafeMarkupTest::testCheckPlain()
Tests SafeMarkup::checkPlain().
@dataProvider providerCheckPlain @covers ::checkPlain
Parameters
string $text: The text to provide to SafeMarkup::checkPlain().
string $expected: The expected output from the function.
string $message: The message to provide as output for the test.
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ SafeMarkupTest.php, line 73 - Contains \Drupal\Tests\Component\Utility\SafeMarkupTest.
Class
- SafeMarkupTest
- Tests marking strings as safe.
Namespace
Drupal\Tests\Component\UtilityCode
function testCheckPlain($text, $expected, $message) {
$result = SafeMarkup::checkPlain($text);
$this
->assertTrue($result instanceof HtmlEscapedText);
$this
->assertEquals($expected, $result, $message);
}