diff --git a/tests/HTMLPurifier/SimpleTest/TextReporter.php b/tests/HTMLPurifier/SimpleTest/TextReporter.php new file mode 100644 index 00000000..77b9f388 --- /dev/null +++ b/tests/HTMLPurifier/SimpleTest/TextReporter.php @@ -0,0 +1,18 @@ +verbose = $AC['verbose']; + } + function paintPass($message) { + parent::paintPass($message); + if ($this->verbose) { + print 'Pass ' . $this->getPassCount() . ") $message\n"; + $breadcrumb = $this->getTestList(); + array_shift($breadcrumb); + print "\tin " . implode("\n\tin ", array_reverse($breadcrumb)); + print "\n"; + } + } +} diff --git a/tests/index.php b/tests/index.php index c706ffb5..9ed3d8bc 100755 --- a/tests/index.php +++ b/tests/index.php @@ -40,6 +40,7 @@ $AC['xml'] = false; $AC['dry'] = false; $AC['php'] = $php; $AC['help'] = false; +$AC['verbose'] = false; $AC['type'] = ''; $AC['disable-phpt'] = false; @@ -47,7 +48,8 @@ $AC['only-phpt'] = false; // alias for --type=phpt $aliases = array( 'f' => 'file', - 'h' => 'help' + 'h' => 'help', + 'v' => 'verbose', ); // It's important that this does not call the autoloader. Not a problem @@ -65,6 +67,7 @@ Allowed options: --php /path/to/php --type ( htmlpurifier | configdoc | fstools | htmlt | vtest | phpt ) --disable-phpt + --verbose (-v)