allowElement('p') ->allowElement('br') ->allowElement('strong') ->allowElement('em') ->allowElement('ul') ->allowElement('ol') ->allowElement('li') ->allowElement('a', ['href', 'target', 'rel']); $this->sanitizer = new HomeworkHtmlSanitizer(new HtmlSanitizer($config)); } #[Test] public function itAllowsBoldText(): void { $html = '
Texte en gras
'; self::assertSame($html, $this->sanitizer->sanitize($html)); } #[Test] public function itAllowsItalicText(): void { $html = 'Texte en italique
'; self::assertSame($html, $this->sanitizer->sanitize($html)); } #[Test] public function itAllowsUnorderedLists(): void { $html = 'Texte
'); self::assertStringNotContainsString('