Beispiel #1
0
 public function testGetColumnsIs80ForUnknownTerminal()
 {
     $term = getenv('TERM');
     putenv('TERM=');
     $terminal = new Terminal();
     $this->assert($terminal->getColumns())->equals(80);
     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();
 }