File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
src/Symfony/Component/Console Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ public function getEstimated(): float
229
229
230
230
public function getRemaining (): float
231
231
{
232
- if (! $ this ->step ) {
232
+ if (0 === $ this ->step || $ this -> step === $ this -> startingStep ) {
233
233
return 0 ;
234
234
}
235
235
Original file line number Diff line number Diff line change @@ -110,6 +110,14 @@ public function testRegularTimeEstimation()
110
110
);
111
111
}
112
112
113
+ public function testRegularTimeRemainingWithDifferentStartAtAndCustomDisplay ()
114
+ {
115
+ ProgressBar::setFormatDefinition ('custom ' , ' %current%/%max% [%bar%] %percent:3s%% %remaining% %estimated% ' );
116
+ $ bar = new ProgressBar ($ output = $ this ->getOutputStream (), 1_200 , 0 );
117
+ $ bar ->setFormat ('custom ' );
118
+ $ bar ->start (1_200 , 600 );
119
+ }
120
+
113
121
public function testResumedTimeEstimation ()
114
122
{
115
123
$ bar = new ProgressBar ($ output = $ this ->getOutputStream (), 1_200 , 0 );
You can’t perform that action at this time.
0 commit comments