Exemple #1
0
 /**
  * @depends testPattern
  */
 public function testLineBreak()
 {
     $progress = new Progress(10, '%bar%');
     $progress->width = 10;
     $progress->lineBreakOnFinish = false;
     ob_start();
     $progress->show(10);
     $this->assertEquals("\r[==========]", ob_get_clean());
     $progress->lineBreakOnFinish = true;
     ob_start();
     $progress->show(10);
     $this->assertEquals("\r[==========]\n", ob_get_clean());
 }