Issue Type: Bug Created: 2012-03-01T10:57:45.000+0000 Last Updated: 2012-03-05T18:21:30.000+0000 Status: Open Fix version(s): Reporter: Andreas Heigl (heiglandreas) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Test_PHPUnit
Related issues: Attachments: - DomQueryPatch
Testing the following XML with Zend_Test_PHPUnit_ControllerTestCase::assertQueryContentContains('content','0') fails due to type-conversion. ```
The Zend_Test_PHPUnit_Constraint_DomQuery::_matchContent()-method uses strstr to check for the existence of *0* in the string *0* and returns *0*. The surrounding if then interprets this as false and returns an unexpected value.
Using strpos instead of strstr results in the expected return value of the method.
The attatched Patch-File will change the strstr call to a strpos-call for the file Zend_Test_PHPUnit_Constraint_DomQuery
No comments to display
Have you found an issue?
See the Overview section for more details.