dev on listeners
This commit is contained in:
parent
6bd6de7676
commit
b9d8f04875
@ -14,11 +14,21 @@ class Listener implements TestListener{
|
||||
|
||||
private $stack=[];
|
||||
|
||||
public function addWarning(Test $test, Warning $e, $time){}
|
||||
public function addWarning(Test $test, Warning $e, $time){
|
||||
die("wrank");
|
||||
print_r($test->getName());
|
||||
}
|
||||
|
||||
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time){}
|
||||
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time){
|
||||
die("err");
|
||||
print_r($test->getName());
|
||||
}
|
||||
|
||||
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time){}
|
||||
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time){
|
||||
$name=get_class($test).'::'.$test->getName();
|
||||
$message=$e->getMessage();
|
||||
echo("##### $name\n$message\n");
|
||||
}
|
||||
|
||||
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time){}
|
||||
|
||||
@ -28,7 +38,9 @@ class Listener implements TestListener{
|
||||
|
||||
public function startTest(PHPUnit_Framework_Test $test){}
|
||||
|
||||
public function endTest(PHPUnit_Framework_Test $test, $time){}
|
||||
public function endTest(PHPUnit_Framework_Test $test, $time){
|
||||
print_r( $test->getActualOutput());
|
||||
}
|
||||
|
||||
public function startTestSuite(PHPUnit_Framework_TestSuite $suite){
|
||||
$this->stack[$suite->getName()]='yes';
|
||||
@ -37,7 +49,7 @@ class Listener implements TestListener{
|
||||
public function endTestSuite(PHPUnit_Framework_TestSuite $suite){
|
||||
unset($this->stack[$suite->getName()]);
|
||||
if(count($this->stack)==0){
|
||||
echo "ALLDONE";
|
||||
echo "\n\nALLDONE\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
29
src/ResultPrinter.php
Normal file
29
src/ResultPrinter.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
namespace JHodges\GiteaBitPHPUnit;
|
||||
|
||||
use Psr\Log\LoggerAwareTrait;
|
||||
use Psr\Log\LogLevel;
|
||||
|
||||
class ResultPrinter extends \PHPUnit\TextUI\ResultPrinter
|
||||
{
|
||||
|
||||
public function __construct($out = null, $verbose = false, $colors = self::COLOR_DEFAULT, $debug = false, $numberOfColumns = 80)
|
||||
{
|
||||
}
|
||||
|
||||
public function printResult(\PHPUnit\Framework\TestResult $result)
|
||||
{
|
||||
}
|
||||
|
||||
protected function printHeader()
|
||||
{
|
||||
}
|
||||
|
||||
public function messageProcessor(array $record)
|
||||
{
|
||||
}
|
||||
|
||||
public function suiteNameProcessor(array $record)
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user