Merge "Don't reinvent the wheel in SpecialRecentchangeslinked::getExtraOptions"
[lhc/web/wiklou.git] / tests / selenium / SeleniumTestConsoleLogger.php
1 <?php
2
3 class SeleniumTestConsoleLogger {
4 public function __construct() {
5 // Prepare testsuite for immediate output
6 @ini_set( 'zlib.output_compression', 0 );
7 @ini_set( 'implicit_flush', 1 );
8 for ( $i = 0; $i < ob_get_level(); $i++ ) {
9 ob_end_flush();
10 }
11 ob_implicit_flush( 1 );
12 }
13
14 public function write( $message, $mode = false ) {
15 $out = '';
16 // if ( $mode == SeleniumTestSuite::RESULT_OK ) $out .= '<font color="green">';
17 $out .= htmlentities( $message );
18 // if ( $mode == SeleniumTestSuite::RESULT_OK ) $out .= '</font>';
19 if ( $mode != SeleniumTestSuite::CONTINUE_LINE ) {
20 $out .= "\n";
21 }
22
23 echo $out;
24 }
25 }