Re: XML_Parser offline unit tests
| From: | Sebastian Mendel | Date: | Fri, 03 Aug 2007 10:14:50 +0000 |
| Subject: | Re: XML_Parser offline unit tests | ||
| References: | 1 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-4478@lists.php.net to get a copy of this message | ||
Christian Weiske schrieb:
> Hello Stefan,
>
>
> XML_Parser unfortunately does not work in the pear-wide test suite
> because the tests assume a working directory to include the XML_Parser
> class via
>> require_once(../Parser.php)
>
> could you change this to read
>> require_once(dirname(__FILE__) . '/../Parser.php');
> or even better
>> require_once('XML/Parser.php');
why is this better?
you can assume XML_Parser tests are always on the same relative path to XML
classes, but you cannot assume that XML/ parent dir is always in include
path ... i would prefer the first one with dirname()
or did i missed something?
--
Sebastian Mendel
www.sebastianmendel.de