/** * Draw the progress bar. * Prints the progress-bar to the screen. If start() has not been called * yet, the current line is used for {@link ezcConsolProgressbar::start()}. * * @return void */ public function output() { if ($this->options->minVerbosity > $this->output->options->verbosityLevel || $this->options->maxVerbosity !== false && $this->options->maxVerbosity < $this->output->options->verbosityLevel) { // Do not print progress bar if verbosity level is lower than it's // output objects value. return; } if ($this->started === false) { $this->start(); } $this->output->restorePos(); if (ezcBaseFeatures::os() === "Windows") { echo str_repeat("", $this->options->width); } $this->generateValues(); echo $this->insertValues(); }
public function testRestorePosFailure() { $output = new ezcConsoleOutput(); try { $output->restorePos(); } catch (ezcConsoleNoPositionStoredException $e) { return; } $this->fail("Exception not thrown on restore position without stored position."); }
public function testRestorePosFailure() { if (ezcBaseFeatures::os() === 'Windows') { $this->markTestSkipped("Does not work on Windows"); } $output = new ezcConsoleOutput(); try { $output->restorePos(); } catch (ezcConsoleNoPositionStoredException $e) { return; } $this->fail("Exception not thrown on restore position without stored position."); }