logo       

cvs: pear /PHPUnit package.xml /PHPUnit/GUI README gui.php /PHPUnit/PHPUn: msg#00580

php.cvs.pear

Subject: cvs: pear /PHPUnit package.xml /PHPUnit/GUI README gui.php /PHPUnit/PHPUnit/GUI README gui.php

sebastian Wed Sep 25 15:10:35 2002 EDT

Added files:
/pear/PHPUnit/PHPUnit/GUI README gui.php

Removed files:
/pear/PHPUnit/GUI README gui.php

Modified files:
/pear/PHPUnit package.xml
Log:
Move GUI.


Index: pear/PHPUnit/package.xml
diff -u pear/PHPUnit/package.xml:1.28 pear/PHPUnit/package.xml:1.29
--- pear/PHPUnit/package.xml:1.28 Wed Sep 25 04:05:53 2002
+++ pear/PHPUnit/package.xml Wed Sep 25 15:10:34 2002
@@ -29,12 +29,12 @@
<filelist>
<file role="php" baseinstalldir="/">PHPUnit.php</file>

- <dir name="GUI">
- <file role="php" name="gui.php"/>
- <file role="doc" name="README"/>
- </dir>
-
<dir name="PHPUnit">
+ <dir name="GUI">
+ <file role="php" name="gui.php"/>
+ <file role="doc" name="README"/>
+ </dir>
+
<file role="php" name="Assert.php"/>
<file role="php" name="RepeatedTest.php"/>
<file role="php" name="TestCase.php"/>

Index: pear/PHPUnit/PHPUnit/GUI/gui.php
+++ pear/PHPUnit/PHPUnit/GUI/gui.php
<?php
//
// +----------------------------------------------------------------------+
// | PHP Version 4 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2002 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.02 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@xxxxxxx so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Alexander Merz <alexmerz@xxxxxxx> |
// +----------------------------------------------------------------------+
//
// $Id: gui.php,v 1.1 2002/09/25 19:10:34 sebastian Exp $
//


// Set the name of your testsuite class
$testName = "";
// Set the path of your testsuite file
$testFile = "";

require_once "PHPUnit.php";
require_once $testFile;

// run test
$suite = new PHPUnit_TestSuite($testName);
$result = PHPUnit::run($suite);

// do some calculations
$per = 100/$result->runCount();
$notOkWidth = ($per*$result->errorCount())+($per*$result->failureCount());
$okWidth = 100 - $notOkWidth ;

?>

<html>
<head>
<title>PHPUnit - GUI</title>
</head>
<body>
<h1>PHPUnit GUI</h1>
<h2><?php echo $testName; ?></h2>
<table>
<tr><td>Runs:</td><td> <?php echo $result->runCount(); ?></td></tr>
<tr><td>Errors:</td><td> <?php echo $result->errorCount(); ?></td></tr>

<tr><td>Failures: </td><td><?php echo $result->failureCount();
?></td></tr>
</table>
<table width="50%">
<tr>
<td width="20%" align="left">0%</td>
<td width="20%" align="center">25%</td>
<td width="20%" align="center">50%</td>
<td width="20%" align="center">75%</td>
<td width="20%" align="right">100%</td>

</tr>
</table>
<table width="50%" height="30px" cellspan="0" cellpadding="0">
<tr>
<td width="<?php echo $okWidth; ?>%" bgcolor="green"></td>
<td width="<?php echo $notOkWidth; ?>%" bgcolor="red"></td>

</tr>
</table>
<h3>Failures</h3>
<form>
<textarea wrap="physical" cols="80" rows="10">
<?php
// print the failures
$fails = $result->failures();
foreach($fails as $failure) {
echo $failure->toString();
echo "-------------------------------\n";
}
?>
</textarea>
</form>
<h3>Errors</h3>
<form>
<textarea wrap="physical" cols="80" rows="10">
<?php
// print the errors
$errs = $result->errors();
foreach($errs as $error) {
echo $errors->toString();
echo "-------------------------------\n";
}
?>
</textarea>
</form>
</body>
</html>


--
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise