MediaWiki  REL1_19
SeleniumTestConsoleLogger.php
Go to the documentation of this file.
00001 <?php
00002 
00003 class SeleniumTestConsoleLogger {
00004         public function __construct() {
00005                 // Prepare testsuite for immediate output
00006                 @ini_set( 'zlib.output_compression', 0 );
00007                 @ini_set( 'implicit_flush', 1 );
00008                 for ( $i = 0; $i < ob_get_level(); $i++ ) {
00009                         ob_end_flush();
00010                 }
00011                 ob_implicit_flush( 1 );
00012         }
00013 
00014         public function write( $message, $mode = false ) {
00015                 $out = '';
00016                 // if ( $mode == SeleniumTestSuite::RESULT_OK ) $out .= '<font color="green">';
00017                 $out .= htmlentities( $message );
00018                 // if ( $mode == SeleniumTestSuite::RESULT_OK ) $out .= '</font>';
00019                 if ( $mode != SeleniumTestSuite::CONTINUE_LINE ) {
00020                         $out .= "\n";
00021                 }
00022 
00023                 echo $out;
00024         }
00025 }