Permalink
Browse files

Support empty content in tag matcher

  • Loading branch information...
1 parent 8d06944 commit 67c55272a5aff4191622a162b2e6356e60fc0a1f @pwfisher committed Mar 9, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 PHPUnit/Util/XML.php
View
@@ -622,6 +622,13 @@ public static function findNodes(DOMDocument $dom, array $options, $isHtml = TRU
}
}
+ // match empty string
+ else if ($options['content'] === '') {
+ if (self::getNodeText($node) !== '') {
+ $invalid = TRUE;
+ }
+ }
+
// match by exact string
else if (strstr(self::getNodeText($node), $options['content']) === FALSE) {
$invalid = TRUE;

0 comments on commit 67c5527

Please sign in to comment.