|
|
@@ -191,4 +191,53 @@ class ProgressHelperTest extends TestCase
|
|
|
|
|
|
$this->assertEquals($expected, $this->stub->messages());
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Test increment and draw with value that makes the pad
|
|
|
+ * be a float
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function testIncrementFloatPad()
|
|
|
+ {
|
|
|
+ $this->helper->init([
|
|
|
+ 'total' => 50
|
|
|
+ ]);
|
|
|
+ $expected = [
|
|
|
+ '',
|
|
|
+ '=========> 14%',
|
|
|
+ '',
|
|
|
+ '====================> 28%',
|
|
|
+ '',
|
|
|
+ '==============================> 42%',
|
|
|
+ '',
|
|
|
+ '=========================================> 56%',
|
|
|
+ '',
|
|
|
+ '===================================================> 70%',
|
|
|
+ '',
|
|
|
+ '========================================================> 76%',
|
|
|
+ '',
|
|
|
+ '==============================================================> 84%',
|
|
|
+ '',
|
|
|
+ '==========================================================================> 100%',
|
|
|
+ ];
|
|
|
+ $this->helper->increment(7);
|
|
|
+ $this->helper->draw();
|
|
|
+ $this->helper->increment(7);
|
|
|
+ $this->helper->draw();
|
|
|
+ $this->helper->increment(7);
|
|
|
+ $this->helper->draw();
|
|
|
+ $this->helper->increment(7);
|
|
|
+ $this->helper->draw();
|
|
|
+ $this->helper->increment(7);
|
|
|
+ $this->helper->draw();
|
|
|
+ $this->helper->increment(3);
|
|
|
+ $this->helper->draw();
|
|
|
+ $this->helper->increment(4);
|
|
|
+ $this->helper->draw();
|
|
|
+ $this->helper->increment(8);
|
|
|
+ $this->helper->draw();
|
|
|
+
|
|
|
+ $this->assertEquals($expected, $this->stub->messages());
|
|
|
+ }
|
|
|
}
|