Re: Re: cvs: pear / AllTests.php
| From: | Lorenzo Alberton | Date: | Fri, 06 Jul 2007 06:49:52 +0000 |
| Subject: | Re: Re: cvs: pear / AllTests.php | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47241@lists.php.net to get a copy of this message | ||
david.coallier@nyphp.com wrote:
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)?yeah, thanks, I've seen it. I know that's a possible solution (and was already suggested [1]), but since this seems to be a promising and effective PEAR QA tool, I was thinking that maybe the pear server could be set up to test The Real Thing(TM), at least for some DBMS? There are many packages that depend on a db, it could be useful for all of them... I know that would require a lot of resources, anyway it's just an idea, and as such I throw it on the table. And if someone wants to help out with [1], I'd appreciate that :-) Best regards, -- Lorenzo Alberton http://pear.php.net/user/quipo [1] http://pear.php.net/bugs/bug.php?id=11108 ________________________________________________________________________ Quipo Free Internet: sicuro e veloce senza costi di attivazione e senza canone, 2 e-mail da 25 Mb, 150 Mb di spazio web e molto di più! Registrati gratis: http://www.quipo.itIf 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 phpunitLorenzo if you want to see some mocks of database you can look in pearweb/tests theres a bunch testing the databse (mocking)