Skip to content

Commit

Permalink
MDL-60139 phpunit: Make assertTag verify attribute values with ===
Browse files Browse the repository at this point in the history
I had a test that cared about the difference between value="5.0" and value="5".
  • Loading branch information
timhunt committed Oct 30, 2017
1 parent 40f1801 commit 46a3753
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/phpunit/classes/base_testcase.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public static function findNodes(DOMDocument $dom, array $options, $isHtml = tru
}
} // match by exact string
else {
if ($node->getAttribute($name) != $value) {
if ($node->getAttribute($name) !== (string) $value) {
$invalid = true;
}
}
Expand Down

0 comments on commit 46a3753

Please sign in to comment.