phing + phpunit relative path.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm not really sure if this question belongs on these lists - please
forgive if it isn't. I've got a project running locally.

I've got a phing build.xml in the root directory and a document
structure based like this.
webroot/incudes/package/fileToBeTested.inc
webroot/includes/package/t/FileToBeTestedTest.php

FileToBeTestedTest.php includes fileToBeTested.inc via the
require_once("../fileToBeTested.inc"); method, i.e. it uses a relative
path.

This works well in phpeclipse and for running phpunit from the command line.

However when I try to include the test file via phing.

       <target name="test">
               <includepath classpath="${project.basedir}/includes/Errors" />
               <phpunit2 haltonfailure="true" printsummary="true">
                       <batchtest>
                               <fileset
dir="${project.basedir}/includes/Errors/t">
                                       <include name="*Test.php" />
                               </fileset>
                       </batchtest>
               </phpunit2>
       </target>

backing out of the include directory using the .. opperator doesn't
seem to work.  This leave me to use an absolute path for include,
however if I do this phpunit and eclipse both don't like this. Eclipse
warns that the include isn't in the current directory.

Is there any solution to this problem that gives the expected result
for all three applications.   Is it true you can't use the ../ syntax
to step out of an include directory specified in the php.ini

Regards,
Wes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux