Exemplo n.º 1
0
 public function onStart(RunEvent $e)
 {
     $this->stopped = false;
     $this->width = $this->console->getWidth();
     $this->total = count($e->getParam('tests'));
     $this->console->writeLine('Running diagnostics:');
     $this->console->writeLine('');
 }
Exemplo n.º 2
0
 public function onStart(RunEvent $e)
 {
     $this->stopped = false;
     $this->width = $this->console->getWidth();
     $this->total = count($e->getParam('tests'));
     // Calculate gutter width to accommodate number of tests passed
     if ($this->total <= $this->width) {
         $this->gutter = 0;
         // everything fits well
     } else {
         $this->countLength = floor(log10($this->total)) + 1;
         $this->gutter = $this->countLength * 2 + 11;
     }
     $this->console->writeLine('Running diagnostics:');
     $this->console->writeLine('');
     $this->console->write('       ');
 }