Constructor.
public __construct ( mixed $out = null, boolean $verbose = false, string $colors = self::COLOR_DEFAULT, boolean $debug = false, integer | string $numberOfColumns = 80, boolean $reverse = false ) | ||
$out | mixed | |
$verbose | boolean | |
$colors | string | |
$debug | boolean | |
$numberOfColumns | integer | string | |
$reverse | boolean |
public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE) { ob_start(); // start output buffering, so we can send the output to the browser in chunks $this->autoFlush = true; parent::__construct($out, $verbose, false, $debug); }
public function __construct($out = null, $verbose = false, $colors = false, $debug = false) { parent::__construct($out, $verbose, $colors, $debug); $this->colors = false; $this->printsHTML = true; $this->debug = self::$shouldDebug; }
/** * {@inheritdoc} */ public function __construct($out, $verbose, $colors, $debug, $numberOfColumns) { parent::__construct($out, $verbose, $colors, $debug, $numberOfColumns); if ($html_output_directory = getenv('BROWSERTEST_OUTPUT_DIRECTORY')) { // Initialize html output debugging. $html_output_directory = rtrim($html_output_directory, '/'); // Check if directory exists. if (!is_dir($html_output_directory) || !is_writable($html_output_directory)) { $this->writeWithColor('bg-red, fg-black', "HTML output directory {$html_output_directory} is not a writable directory."); } else { // Convert to a canonicalized absolute pathname just in case the current // working directory is changed. $html_output_directory = realpath($html_output_directory); $this->browserOutputFile = tempnam($html_output_directory, 'browser_output_'); if ($this->browserOutputFile) { touch($this->browserOutputFile); } else { $this->writeWithColor('bg-red, fg-black', "Unable to create a temporary file in {$html_output_directory}."); } } } if ($this->browserOutputFile) { putenv('BROWSERTEST_OUTPUT_FILE=' . $this->browserOutputFile); } else { // Remove any environment variable. putenv('BROWSERTEST_OUTPUT_FILE'); } }
/** * Constructor * * @param null $out * @param bool $verbose * @param bool $colors * @param bool $debug */ public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE) { parent::__construct($out, $verbose, $colors, $debug); // this class being used as a printerClass doesn't receive any configuration from PHPUnit. // that's we need this hack... if (isset($_SERVER['argv']) && in_array('--colors', $_SERVER['argv'])) { $this->colors = true; } }
public function __construct($_blDBResetPerTest = true, $_blDBResetPerSuit = true, $iDBChangeMode = MAINTENANCE_SINGLEROWS, $_iDBChangeOutput = MAINTENANCE_MODE_ONLYRESET, $blVerbose = false) { parent::__construct(null, (bool) $blVerbose); $this->_iDBChangeMode = $iDBChangeMode; $this->_iDBChangeOutput = $_iDBChangeOutput; $this->_blDBResetPerTest = $_blDBResetPerTest; $this->_blDBResetPerSuit = $_blDBResetPerSuit; $this->_oDBMaintenance = new dbMaintenance(); }
/** * {@inheritdoc} */ public function __construct($out = null, $verbose = false, $colors = self::COLOR_DEFAULT, $debug = false, $numberOfColumns = 80) { parent::__construct($out, $verbose, $colors, $debug, $numberOfColumns); if ($numberOfColumns === 'max') { $console = new Console(); $numberOfColumns = $console->getNumberOfColumns(); } $this->maxNumberOfColumns = $numberOfColumns; $this->maxClassNameLength = intval($numberOfColumns * 0.6); }
/** * Constructor. * * @param mixed $out * @param boolean $verbose * @param boolean $colors * @param boolean $debug */ public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE) { // Start capturing output ob_start(); $argv = $_SERVER['argv']; $colors = in_array('--colors', $argv) || $colors; $verbose = in_array('--verbose', $argv) || in_array('-v', $argv) || $verbose; $debug = in_array('--debug', $argv) || $debug; parent::__construct($out, $verbose, $colors, $debug); }
public function __construct($backtrace, $colors = false) { parent::__construct(null, false, $colors); $this->backtrace = ''; foreach ($backtrace as $trace) { if (isset($trace['file']) && isset($trace['line'])) { $this->backtrace .= $trace['file'] . ':' . $trace['line'] . "\n"; } } }
public function __construct() { // ARRGH - PHPUnit does not give us commandline arguments or xml config, so let's hack hard! if (defined('DEBUG_BACKTRACE_PROVIDE_OBJECT')) { $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT); if (isset($backtrace[2]['object']) and $backtrace[2]['object'] instanceof PHPUnit_TextUI_Command) { list($verbose, $colors, $debug) = Hacky_TextUI_Command_reader::get_settings_hackery($backtrace[2]['object']); parent::__construct(null, $verbose, $colors, $debug); return; } } // Fallback if something goes wrong. parent::__construct(null, false, self::COLOR_DEFAULT, false); }
public function __construct($backtrace, $colors = false) { $out = null; if (php_sapi_name() == 'cli') { // prevent headers already sent error when started from CLI $out = 'php://stderr'; } parent::__construct($out, false, $colors); $this->backtrace = ''; foreach ($backtrace as $trace) { if (isset($trace['file']) && isset($trace['line'])) { $this->backtrace .= $trace['file'] . ':' . $trace['line'] . "\n"; } } }
public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE) { parent::__construct($out, $verbose, $colors); if (!empty($_SERVER['COLUMNS'])) { $this->maxColumns = $_SERVER['COLUMNS']; } else { if (function_exists('ncurses_getmaxyx')) { ncurses_getmaxyx(STDSCR, $height, $this->maxColumns); } else { // Try to get it on *nix like systems exec('resize 2>/dev/null', $output, $ret); if ($ret === 0 && preg_match('/COLUMNS=([0-9]+)/', $output[0], $m)) { $this->maxColumns = $m[1]; } } } }
/** * {@inheritDoc} */ public function __construct($out = null, $verbose = false, $colors = self::COLOR_DEFAULT, $debug = false, $numberOfColumns = 80) { parent::__construct($out, $verbose, $colors, $debug, $numberOfColumns); if ($this->debug) { $minLevelOrList = LogLevel::INFO; } elseif ($this->verbose) { $minLevelOrList = LogLevel::NOTICE; } else { $minLevelOrList = array(LogLevel::NOTICE, LogLevel::ERROR); } $console = new \MonologConsoleLogger('ResultPrinter'); $console->setAcceptedLevels($minLevelOrList); $handlers = $console->getHandlers(); foreach ($handlers as &$handler) { // attachs processors only to console handler if ($handler instanceof \Monolog\Handler\FilterHandler) { // new results presentation when color is supported or not $handler->pushProcessor(array($this, 'messageProcessor')); } } $this->setLogger($console); }
/** * {@inheritdoc} */ public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE) { $term = empty($_SERVER['TERM']) ? 'unknown' : $_SERVER['TERM']; $this->fab = \Fab\Factory::getFab($term); parent::__construct($out, $verbose, true, $debug); }
/** * Constructor. * * @param mixed $out * @param boolean $verbose * @param boolean $colors * @param boolean $debug * @throws PHPUnit_Framework_Exception * @since Method available since Release 3.0.0 */ public function __construct($out = null, $verbose = false, $colors = false, $debug = false, $seed = null) { parent::__construct($out, $verbose, $colors, $debug); $this->seed = $seed; }
public function __construct($out = NULL, $colors = FALSE) { parent::__construct($out, false, $colors); }
public function __construct(EventDispatcher $dispatcher, $options, $out = null) { parent::__construct($out, $options['verbosity'] > 1, $options['colors']); $this->dispatcher = $dispatcher; }
public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE) { parent::__construct($out, $verbose, $colors, $debug); }
/** * {@inheritdoc} */ public function __construct($out = NULL, $verbose = FALSE, $colors = FALSE, $debug = FALSE) { $this->scoreboard = new Scoreboard(new Cat(), new Rainbow(FabFactory::getFab(empty($_SERVER['TERM']) ? 'unknown' : $_SERVER['TERM'])), array(new Team('pass', 'green', '^'), new Team('fail', 'red', 'o'), new Team('pending', 'cyan', '-')), 5, array($this, 'write')); parent::__construct($out, $verbose, true, $debug); }
public function __construct($out = NULL, $silent = FALSE, $colors = FALSE, $debug = FALSE) { parent::__construct($out, false, $colors, $debug); $this->silent = $silent; }
public function __construct() { parent::__construct(); $this->options = new PHPUnitXt_Base_PrinterOptions(); }
public function __construct(EventDispatcher $dispatcher, $options, $out = null) { parent::__construct($out, $options['verbosity'] > OutputInterface::VERBOSITY_NORMAL, $options['colors'] ? 'always' : 'never'); $this->dispatcher = $dispatcher; }
public function __construct(array $expectedTimes, $out = NULL, $verbose = FALSE, $colors = FALSE) { $this->_verbose = $verbose; parent::__construct($out, false, $colors); $this->_expectedTimes = $expectedTimes; }
public function __construct($verbose = FALSE) { parent::__construct(); }
public function __construct(\Symfony\Component\EventDispatcher\EventDispatcher $dispatcher, $options, $out = null) { parent::__construct($out, $options['steps'], $options['colors'], $options['debug']); $this->dispatcher = $dispatcher; }
public function __construct($out = null, $verbose = false, $colors = self::COLOR_DEFAULT, $debug = false, $numberOfColumns = 80) { parent::__construct('php://stdout', $verbose, $colors, $debug, $numberOfColumns); }