function FieldFilteredMarkupTest::testCreate
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php \Drupal\Tests\Core\Field\FieldFilteredMarkupTest::testCreate()
- 8.9.x core/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php \Drupal\Tests\Core\Field\FieldFilteredMarkupTest::testCreate()
- 10 core/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php \Drupal\Tests\Core\Field\FieldFilteredMarkupTest::testCreate()
@covers ::create @dataProvider providerTestCreate
File
-
core/
tests/ Drupal/ Tests/ Core/ Field/ FieldFilteredMarkupTest.php, line 22
Class
- FieldFilteredMarkupTest
- @coversDefaultClass \Drupal\Core\Field\FieldFilteredMarkup @group Field
Namespace
Drupal\Tests\Core\FieldCode
public function testCreate($string, $expected, $instance_of_check) : void {
$filtered_string = FieldFilteredMarkup::create($string);
if ($instance_of_check) {
$this->assertInstanceOf(FieldFilteredMarkup::class, $filtered_string);
}
$this->assertSame($expected, (string) $filtered_string);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.