Re: cvs: pear / AllTests.php
| From: | Christian Weiske | Date: | Thu, 05 Jul 2007 09:34:11 +0000 |
| Subject: | Re: cvs: pear / AllTests.php | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47202@lists.php.net to get a copy of this message | ||
Lorenzo,
> wow, it looks like you're adding a wonderful QA tool
> to the stack, thanks!
:) I hope it will be useful
> typo: "... to contain every ..."
Fixed.
> Btw, will it work for packages like MDB2 where you have
> external dependencies (database extensions and test databases),
> or like Mail where you need to set some settings about
> system tools (sendmail etc)?
If you rely on external dependencies, then you should
a) provide a stub that simulates the expected behavior of your external resource so that the tests
can run without that e.g. database not everyone has [1]
b) Check if the resource is available and mark the test as skipped if not.
-> $this->markTestSkipped(); in phpunit
[1] http://www.phpunit.de/pocket_guide/3.1/en/mock-objects.html
Section "stubs"
--
Mit freundlichen Grüßen/Regards,
Christian Weiske