function FieldFilteredMarkupTest::testCreate
Tests create.
@legacy-covers ::create
Attributes
#[DataProvider('providerTestCreate')]
File
-
core/
tests/ Drupal/ Tests/ Core/ Field/ FieldFilteredMarkupTest.php, line 27
Class
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.