sebastianbergmann/comparator — pull request #10 by aboks (2014-12-01 08:20:04+00:00)
Title: Fix error when comparing empty DOM nodes

Without this PR, doing a comparison like
```
$emptyDoc = new DOMDocument;
$comparator->assertEquals($emptyDoc, $emptyDoc);
```
would fail with an error `DOMDocument::loadXML(): Empty string supplied as input` due to the canonicalization step. This PR skips the load-into-a-new-document step when the node canonicalizes to an empty string.

Tests are included.