Re: Why change require_once? A brief explanation of motives
| From: | Pádraic Brady | Date: | Tue, 17 Jul 2007 16:04:13 +0000 |
| Subject: | Re: Why change require_once? A brief explanation of motives | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-47578@lists.php.net to get a copy of this message | ||
>Unit tests always require some sort of setup or runner script. This
>script can handle this part. Ideally one would be able to run the tests
>using autoload or allfiles, just to check if its works both ways.
Or those writing the tests could simply assume the most convenient loading functionality
(performance not a concern for test running afterall) and allow someone else to write a unit test
for the loading strategies separately. Unit testing should take place in isolation anyway - the
loading strategy will never be the focus of package level unit tests. What does Crypt_DiffieHellman
care about __autoload() failing? ;) Not its problem...
Pádraic Brady
http://blog.astrumfutura.com
http://www.patternsforphp.com
----- Original Message ----
From: Lukas Kahwe Smith <mls@pooteeweet.org>
To: Alexey Borzov <borz_off@cs.msu.su>
Cc: Alan Knowles <alan@akbkhome.com>; Greg Beaver <greg@chiaraquartet.net>; PEAR
developer mailinglist <pear-dev@lists.php.net>
Sent: Tuesday, July 17, 2007 3:59:16 PM
Subject: Re: [PEAR-DEV] Why change require_once? A brief explanation of motives
Alexey Borzov wrote:
> Hi,
>
> Lukas Kahwe Smith wrote:
>>> The usage examples and unit tests need to load the package classes,
>>> you know, as well as dependencies. How are they going to find them?
>>
>> All packages in PEAR will be able to work with a single __autoload()
>> implementation. So I do not see the issue.
>
> OK, how will the usage examples and unit tests access this single
> __autoload() implementation?
Usage examples will expect the user to have defined this, just as we
expect the include path setting to be setup today.
Unit tests always require some sort of setup or runner script. This
script can handle this part. Ideally one would be able to run the tests
using autoload or allfiles, just to check if its works both ways.
regards,
Lukas
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html