NYCPHP Meetup

NYPHP.org

[nycphp-talk] silent failure with PHPUnit and Zend Framework

Chuck Reeves chuck.reeves at gmail.com
Thu Sep 23 10:32:54 EDT 2010


Check to make sure that all of your test files have at least one test in
them.  Most of the time when PHP Unit has failed for me, that has been the
main reason.

If you are calling setUp or tearDown, make sure you call the parent ones as
well (This is vital if you are using the database test case). And on that
note, do not override the constructor class in any of your tests.



Thank You
Chuck Reeves
Cell: 631-374-0772
Email: chuck.reeves at gmail.com


On Thu, Sep 23, 2010 at 10:26 AM, Rob Marscher
<rmarscher at beaffinitive.com>wrote:

> On Sep 23, 2010, at 10:18 AM, David Mintz wrote:
> > It would be a PITA but I guess I could start removing test classes/files
> one by one until I isolate the offender. Bleh.
>
> Yeah... I had that happen before and ended up putting echo statements into
> my test suite to figure out what test it was failing on.  I wonder if you
> have a 'require' vs 'require_once' somewhere and that's why it only happens
> when running all the tests together.  Or could be a memory issue.  Both of
> those should be displaying an error... unless one of the files goes and
> changes the error_reporting/display_errors on you.
>
> I also remember having a lot of trouble with errors not displaying for
> classes that didn't properly extend interfaces or abstract classes.
>
> Let us know what it was when you find it.
> Thanks,
> Rob
>
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20100923/9b54b0d9/attachment.html>


More information about the talk mailing list