follow-up to r65715: convert spaces to tabs for indentation, as per our coding standa...
[lhc/web/wiklou.git] / maintenance / tests / selenium / SeleniumTestConsoleLogger.php
1 <?php
2 if (!defined('MEDIAWIKI') || !defined('SELENIUMTEST')) {
3 echo "This script cannot be run standalone";
4 exit(1);
5 }
6
7 class SeleniumTestConsoleLogger
8 {
9 public function __construct()
10 {
11 // Prepare testsuite for immediate output
12 @ini_set('zlib.output_compression', 0);
13 @ini_set('implicit_flush', 1);
14 for ($i = 0; $i < ob_get_level(); $i++) { ob_end_flush(); }
15 ob_implicit_flush(1);
16
17 }
18
19 public function write($message, $mode = false)
20 {
21 $out .= '';
22 //if ($mode == MW_TESTLOGGER_RESULT_OK) $out .= '<font color="green">';
23 $out .= htmlentities($message);
24 //if ($mode == MW_TESTLOGGER_RESULT_OK) $out .= '</font>';
25 if ($mode != MW_TESTLOGGER_CONTINUE_LINE) $out .= "\n";
26
27 echo $out;
28 }
29 }