Issues

ZF-12077: Zend_Test_PHPUnit_ControllerTestCase::assertQueryContentContains(<path>,'0') fails for content '0'

Description

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}}

Comments

No comments to display