Home » Testing » PHPUnit2 » Bug #7749
equalTo for parameters in mocked methods does fail on empty arrays
Details
| Submitted | 2006-05-29 10:52 UTC |
|---|---|
| From | kore at php dot net |
| Assigned | sebastian |
| Status | Closed |
| Package | PHPUnit2 |
| PHP Version | 5.1.4 |
| OS | Linux 2.6.16-gentoo-r3 |
| Roadmaps | (Not assigned) |
Comments
[2006-05-29 10:52 UTC] kore at php dot net
Description:
------------
I would expect the test to fail, when I require a parameter to be an array with some values and the method is called with an array, in which some of these values are not set.
Instead of this the test only fails, if the key exists and the value is wrong.
Test script:
---------------
http://kore.phpugdo.de/mock_bug_array.phps
Expected result:
----------------
PHPUnit 3.0.0alpha3 by Sebastian Bergmann.
F
Time: 00:00
There was 1 failure:
[...]
FAILURES!
Tests: 1, Failures: 1.
Actual result:
--------------
PHPUnit 3.0.0alpha3 by Sebastian Bergmann.
.
Time: 00:00
OK (1 test)
[2006-05-29 10:55 UTC] sebastian at php dot net
Thank you for taking the time to report a problem with the package.
Unfortunately you are not using a current version of the package --
the problem might already be fixed. Please download a new
version from http://pear.php.net/packages.php
If you are able to reproduce the bug with one of the latest
versions, please change the package version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PEAR.
[2006-05-29 11:13 UTC] kore at php dot net
Verified bug with PHPUnit2-3.0.0alpha4
[2006-05-31 19:25 UTC] sebastian at php dot net
This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.