use PHPUnit\Framework\TestCase;
use Symfony\Component\HtmlSanitizer\HtmlSanitizer;
use Symfony\Component\HtmlSanitizer\HtmlSanitizerConfig;
class HtmlSanitizerAllTest extends TestCase
{ private function createSanitizer(): HtmlSanitizer
{ return new HtmlSanitizer( (new HtmlSanitizerConfig()) ->
allowStaticElements() ->
allowLinkHosts(['trusted.com', 'external.com'
]) ->
allowMediaHosts(['trusted.com', 'external.com'
]) ->
allowRelativeLinks() ->
allowRelativeMedias() ->
forceHttpsUrls() );
} /**
* @dataProvider provideSanitizeHead
*/
public function testSanitizeHead(string
$input, string
$expected) {