Re: Multiple Unit Test formats in PEAR, a solution?
| From: | Sebastian Bergmann | Date: | Tue, 11 Oct 2005 10:24:44 +0000 |
| Subject: | Re: Multiple Unit Test formats in PEAR, a solution? | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-40135@lists.php.net to get a copy of this message | ||
Greg Beaver schrieb:
> As the pocket guide is not online, a helpful "do this" or better yet a
> patch against the doRunTests() method in PEAR/Command/Package.php
> would be better than the above links.
Sure, but when I wrote the previous mail I was in a hurry but wanted to
reply nevertheless.
> However, as I see it from a cursory look, all we should do is search
> for an "AllTests.php" file in "Tests" (which should be "tests"
> according to CS but whatever). and simply include it.
Yes, the idea is to have one AllTests.php for the project and for one
for each each package. Running Project_Tests_AllTests
(php AllTests.php) runs all the tests of the project, running
Project_Tests_Package_AllTests runs only the given package's tests.
I named the directory "Tests" instead of "tests" since the classes are
named "Project_Tests_*", which follows the CS for classname -> filename
mapping.
> pear run-tests -pu Packagename
> would try to include data_dir/Packagename/[T|t]ests/AllTests.php
That would be great.
> Greg
Best,
Sebastian
--
Sebastian Bergmann http://www.sebastian-bergmann.de/
GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69