RE: [PEAR-DEV] About PHPUnit/GUI/gui.php
| From: | Naoki Shima | Date: | Fri, 26 Apr 2002 07:24:23 +0000 |
| Subject: | RE: [PEAR-DEV] About PHPUnit/GUI/gui.php | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-5818@lists.php.net to get a copy of this message | ||
My coworker added the functionality that you have mentioned to
pear/PHPUnit/GUI/gui.php.
Take a look at the attached diff if you are interested.
If people like it, then I will commit it.
Also, I think there is a need to provide nice success/fail list of test
functions that
PHPUnit on sourceforge.net provides.
Naoki Shima
naoki@avantexchange.com
murahachibu@php.net
Naoki Shima wrote:
> Instead, I think it's wise to make test**.php that looks like this.
> <?php
> // Set the name of your testsuite class
> $testName = "className";
> // Set the path of your testsuite file
> $testFile = "classFileName";
> include_once 'PHPUnit/GUI/gui.php';
> ?>
This idea isn't bad, but somewhat too briefly meant.
I would prefer a optional form
<form ...>
Testname: <input type="text" name="postClassName">
TestFile on Server <input type="text" name="postClassFile">
or Upload file<input type="file">
</form>
and then add to gui.php
// Set the name of your testsuite class
$defaultTestName = "";
// Set the path of your testsuite file
$defaultTestFile = "";
if(empty($defaultTestName)) {
showForm();
} elseif(isset(_POST['postClassname']) ...) {
$testName = $_POST['postClassName'];
...
} else {
$testName = $defaultTestName;
}