cvs: pear /Net_IPv4/tests SimpleTestListener.php net_ipv4.phpt
| From: | Florian Anderiasch | Date: | Tue, 28 Feb 2006 17:10:59 +0000 |
| Subject: | cvs: pear /Net_IPv4/tests SimpleTestListener.php net_ipv4.phpt | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38743@lists.php.net to get a copy of this message | ||
fa Tue Feb 28 17:10:59 2006 UTC
Added files:
/pear/Net_IPv4/tests SimpleTestListener.php net_ipv4.phpt
Log:
some more testing stuff
http://cvs.php.net/viewcvs.cgi/pear/Net_IPv4/tests/SimpleTestListener.php?view=markup&rev=1.1
Index: pear/Net_IPv4/tests/SimpleTestListener.php
+++ pear/Net_IPv4/tests/SimpleTestListener.php
<?php
require_once 'PHPUnit2/Framework/TestListener.php';
class SimpleTestListener
implements PHPUnit2_Framework_TestListener
{
public function
addError(PHPUnit2_Framework_Test $test, Exception $e)
{
printf(
"Error while running test '%s'.\n",
$test->getName()
);
}
public function
addFailure(PHPUnit2_Framework_Test $test,
PHPUnit2_Framework_AssertionFailedError $e)
{
printf(
"Test '%s' failed.\n",
$test->getName()
);
}
public function
addIncompleteTest(PHPUnit2_Framework_Test $test,
Exception $e)
{
printf(
"Test '%s' is incomplete.\n",
$test->getName()
);
}
public function
addSkippedTest(PHPUnit2_Framework_Test $test,
Exception $e)
{
printf(
"Test '%s' has been skipped.\n",
$test->getName()
);
}
public function startTest(PHPUnit2_Framework_Test $test)
{
printf(
"Test '%s' started.\n",
$test->getName()
);
}
public function endTest(PHPUnit2_Framework_Test $test)
{
printf(
"Test '%s' ended.\n",
$test->getName()
);
}
public function
startTestSuite(PHPUnit2_Framework_TestSuite $suite)
{
printf(
"TestSuite '%s' started.\n",
$suite->getName()
);
}
public function
endTestSuite(PHPUnit2_Framework_TestSuite $suite)
{
printf(
"TestSuite '%s' ended.\n",
$suite->getName()
);
}
}
?>
http://cvs.php.net/viewcvs.cgi/pear/Net_IPv4/tests/net_ipv4.phpt?view=markup&rev=1.1
Index: pear/Net_IPv4/tests/net_ipv4.phpt
+++ pear/Net_IPv4/tests/net_ipv4.phpt
--TEST--
PEAR::Net_IPv4
--FILE--
require_once 'IPv4Test.php';
require_once 'SimpleTestListener.php';
require_once 'PHPUnit2/Framework/TestResult.php';
require_once 'PHPUnit2/Framework/TestSuite.php';
$suite = new PHPUnit2_Framework_TestSuite('IPv4Test');
$result = new PHPUnit2_Framework_TestResult;
$result->addListener(new SimpleTestListener);
$suite->run($result);
--EXPECT--
TestSuite 'IPv4Test' started.
Test 'test_atoh' started.
Test 'test_atoh' ended.
Test 'test_htoa' started.
Test 'test_htoa' ended.
Test 'test_validateIP' started.
Test 'test_validateIP' ended.
Test 'test_ip2double' started.
Test 'test_ip2double' ended.
TestSuite 'IPv4Test' ended.