useErrors = libxml_use_internal_errors(true);
}
protected function tearDown(): void
{
libxml_use_internal_errors($this->useErrors);
}
public function testLoadInvalidString(): void
{
$html = '
';
(new Html())->loadFromString($html);
self::assertNotEmpty(libxml_get_errors());
}
public function testLoadValidString(): void
{
$html = '';
(new Html())->loadFromString($html);
self::assertEmpty(libxml_get_errors());
}
}