Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of git://git.zendframework.com/zf
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelkael committed Jul 22, 2010
7 parents 86c5788 + e0f11cb + 9de6a60 + a729860 + a4b177e + 5e10b10 + 0db5f75 commit bcb7bb1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PHPUnit/Constraint/DomQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ public function registerXpathNamespaces($xpathNamespaces)
*/
protected function _matchContent($result, $match)
{
$match = (string) $match;

if (0 == count($result)) {
return false;
}
Expand Down
2 changes: 2 additions & 0 deletions test/PHPUnit/ControllerTestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ public function testAssertQueryShouldDoNothingForValidResponseContent()
$this->testCase->assertQuery('div#foo legend.bat', $body);
$this->testCase->assertNotQuery('div#foo legend.bogus', $body);
$this->testCase->assertQueryContentContains('legend.bat', 'La di da', $body);
$this->testCase->assertQueryContentContains('legend.numeric', 42, $body);
$this->testCase->assertNotQueryContentContains('legend.numeric', 31, $body);
$this->testCase->assertNotQueryContentContains('legend.bat', 'La do da', $body);
$this->testCase->assertQueryContentRegex('legend.bat', '/d[a|i]/i', $body);
$this->testCase->assertNotQueryContentRegex('legend.bat', '/d[o|e]/i', $body);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<fieldset>
<legend class="bat">La di da</legend>
</fieldset>
<fieldset>
<legend class="numeric">42</legend>
</fieldset>
</div>
</body>
</html>

0 comments on commit bcb7bb1

Please sign in to comment.