public function HtmlTest::testSerialize in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::testSerialize()
Tests Html::serialize().
Resolves an issue by where an empty DOMDocument object sent to serialization would cause errors in getElementsByTagName() in the serialization function.
@covers ::serialize
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ HtmlTest.php, line 323 - Contains \Drupal\Tests\Component\Utility\HtmlTest.
Class
Namespace
Drupal\Tests\Component\UtilityCode
public function testSerialize() {
$document = new \DOMDocument();
$result = Html::serialize($document);
$this
->assertSame('', $result);
}