[Console] Remove estimated field from debug_nomax
This commit is contained in:
parent
6a41ca04dd
commit
2ac1bb45bc
@ -547,13 +547,13 @@ class ProgressBar
|
|||||||
'normal_nomax' => ' %current% [%bar%]',
|
'normal_nomax' => ' %current% [%bar%]',
|
||||||
|
|
||||||
'verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%',
|
'verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%',
|
||||||
'verbose_nomax' => ' %current% [%bar%] %percent:3s%% %elapsed:6s%',
|
'verbose_nomax' => ' %current% [%bar%] %elapsed:6s%',
|
||||||
|
|
||||||
'very_verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%',
|
'very_verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s%',
|
||||||
'very_verbose_nomax' => ' %current% [%bar%] %percent:3s%% %elapsed:6s%',
|
'very_verbose_nomax' => ' %current% [%bar%] %elapsed:6s%',
|
||||||
|
|
||||||
'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%',
|
'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%',
|
||||||
'debug_nomax' => ' %current% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%',
|
'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -404,6 +404,34 @@ class ProgressBarTest extends \PHPUnit_Framework_TestCase
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider provideFormat
|
||||||
|
*/
|
||||||
|
public function testFormatsWithoutMax($format)
|
||||||
|
{
|
||||||
|
$bar = new ProgressBar($output = $this->getOutputStream());
|
||||||
|
$bar->setFormat($format);
|
||||||
|
$bar->start();
|
||||||
|
|
||||||
|
rewind($output->getStream());
|
||||||
|
$this->assertNotEmpty(stream_get_contents($output->getStream()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides each defined format
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function provideFormat()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
array('normal'),
|
||||||
|
array('verbose'),
|
||||||
|
array('very_verbose'),
|
||||||
|
array('debug'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
protected function getOutputStream($decorated = true)
|
protected function getOutputStream($decorated = true)
|
||||||
{
|
{
|
||||||
return new StreamOutput(fopen('php://memory', 'r+', false), StreamOutput::VERBOSITY_NORMAL, $decorated);
|
return new StreamOutput(fopen('php://memory', 'r+', false), StreamOutput::VERBOSITY_NORMAL, $decorated);
|
||||||
|
Reference in New Issue
Block a user