. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Services; use Fisharebest\Webtrees\TestCase; /** * Test harness for the class HtmlService */ class HtmlServiceTest extends TestCase { /** * @covers \Fisharebest\Webtrees\Services\HtmlService::sanitize * * @return void */ public function testAllowedHtml(): void { $html_service = new HtmlService(); $dirty = '
bar
'; $clean = $html_service->sanitize($dirty); self::assertSame($dirty, $clean); } /** * @covers \Fisharebest\Webtrees\Services\HtmlService::sanitize * * @return void */ public function testDisallowedHtml(): void { $html_service = new HtmlService(); $dirty = '
bar
'; $clean = $html_service->sanitize($dirty); self::assertSame('
bar
', $clean); } }