Does anyone here use PHPUnit?
1. If a test script needs some external input to do testing
(notably, database connect info), is it a good idea to present
an HTML form to ask input from user? Or should it also be able
to prompt the user for these in case the test script is run by the PHP binary.
2. I also use Python pyunit. Python has this idiom:
if __name__=='__main__':
# run the test
This is to detect whether the script is executed as the main
module (and not being imported by some other module).
Is there a similar way to be able to do this in PHP? I need to
know whether the PHP file is called directly by the browser/PHP
binary and not include()'d/require()'d by other file. In the
case of require_once() and include_once() I guess I can use
get_required_files()/get_included_files().
Thanks,
Steve
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]