PhpUnit weird behaviour
| From: | LIMBOURG Arnaud | Date: | Thu, 14 Nov 2002 17:28:49 +0000 |
| Subject: | PhpUnit weird behaviour | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-10799@lists.php.net to get a copy of this message | ||
Hello,
I've been playing around with PHPUnit and found a weird behaviour.
My main class derives from PEAR and has the following method
function _readConf()
{
if (is_array($this->_conf) && sizeof($this->_conf) > 0) {
return true;
} // if
include_once CGTL_METADATA_DIR . 'internet/' . $this->_id . '.conf';
if (!isset($conf) || !is_array($conf)) {
return false;
} // if
$this->_conf = $conf;
return true;
} // end func _readConf
the Testcase has two tests which calls an init() method which calls the
_readconf()method.
If i have just one test it works fine.
When i add a second test _readconf() keeps returning FALSE.
The problem does not arise when i use include instead of include_once.
I don't understand why it does that, does anybody has an idea ?
If I was not clear do not hesitate to ask.
Arnaud.