assertInstanceOf(FieldFilteredMarkup::class, $filtered_string); } $this->assertSame($expected, (string) $filtered_string); } /** * Provides data for testCreate(). */ public function providerTestCreate() { $data = []; $data[] = ['', '', FALSE]; // Certain tags are filtered. $data[] = ['', 'teststring', TRUE]; // Certain tags are not filtered. $data[] = ['teststring', 'teststring', TRUE]; // HTML will be normalized. $data[] = ['teststring', 'teststring', TRUE]; // Even safe strings will be escaped. $safe_string = $this->prophesize(MarkupInterface::class); $safe_string->__toString()->willReturn(''); $data[] = [$safe_string->reveal(), 'teststring', TRUE]; return $data; } /** * @covers: ::displayAllowedTags */ public function testdisplayAllowedTags() { $expected = '
        

    • '; $this->assertSame($expected, FieldFilteredMarkup::displayAllowedTags()); } }