globals, simpletest and php from command line

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

 



I have a php app that runs on php4.  I am writing some unit tests now using
SimpleTest but some of the libraries that I have to pull in for testing are
failing.  For example, my db library sets some params:

$dname="mydatabase";
$usr="me";
..etc

I then have some mysql functions that connect using

function con(){
 global $dname;
 ..etc.

}

When this is all run from the browser, things are fine but via simpletest
and command line, the globals are lost.  Is this just a problem with the
command line or with simpletest?

Thanks.

[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