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

Commit

Permalink
patching issue ZF-9478 with patch from Giorgio
Browse files Browse the repository at this point in the history
git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@22561 44c647ce-9c0f-0410-b52a-842ac1e357ba
  • Loading branch information
dragonbe authored and weierophinney committed Jul 22, 2010
2 parents e0f11cb + 9de6a60 commit a729860
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 a729860

Please sign in to comment.