public function getResultPrinter() { $terminal = new Terminal(); if ($this->ci || $terminal->getColors() < 2) { return new CIResultPrinter(); } return new DefaultResultPrinter(); }
public function testGetColorsIs1ForUnknownTerminal() { $term = getenv('TERM'); putenv('TERM='); $terminal = new Terminal(); $this->assert($terminal->getColors())->equals(1); putenv("TERM={$term}"); }
public function __construct(DefaultTheme $theme = null) { $terminal = new Terminal(); $this->width = $terminal->getColumns(); if (!$theme) { $theme = new DefaultTheme(); } $this->theme = $theme; $this->counter = new ProgressCounter(0, true); $this->startTime = time(); $this->formatter = new TimeFormatter(); }