Resources for unit tests
| From: | Bob McConnell | Date: | Mon, 06 Jul 2009 13:41:08 +0000 |
| Subject: | Resources for unit tests | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-294951@lists.php.net to get a copy of this message | ||
I am using Mike Lively's test-harness.php
<http://www.digitalsandwich.com/test-harness.php>
with test-more.php
from Apache::Test for my unit test framework. I have also begun writing
stubs for PostgreSQL functions to run behind that. These tests will be
run on our function libraries as part of the build process just after
code is checked out from the VCS system (Perforce), but before creating
the installation RPMs. i.e. if a unit test fails, report the error and
don't build the RPM.
I am having some difficulty with the Postgres stubs that we don't have
the experience to figure out. Some functions return a resource, which
appears to be a complex form of array. Is there any way to build one
through PHP code, or do I even need to. Since these resources will only
be passed back into a later database call, can I simply replace them in
the stubs with an array? We don't expect to dereference them anyway.
Thank you,
Bob McConnell