globals, simpletest and php from command line
| From: | blackwater dev | Date: | Wed, 30 Aug 2006 20:10:51 +0000 |
| Subject: | globals, simpletest and php from command line | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-241248@lists.php.net to get a copy of this message | ||
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.