Skip to content

Instantly share code, notes, and snippets.

@mchelen
Created January 3, 2017 20:07
Show Gist options
  • Save mchelen/bb733ad3e45b1a53399036e664272b30 to your computer and use it in GitHub Desktop.
Save mchelen/bb733ad3e45b1a53399036e664272b30 to your computer and use it in GitHub Desktop.
<?php
public function testException() {
$this->expectExceptionMessage('DOMDocument::loadXML(): Opening and ending tag mismatch: baz line 3 and root in Entity, line: 4');
// invalid xml
$xml = '<root>
<foo>bar</foo>
<baz>
</root>';
$doc = new DOMDocument();
$doc->loadXML($xml);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment