PHP Класс ProgressBar\Test\ManagerTest

Наследование: extends PHPUnit_Framework_TestCase
Показать файл Открыть проект

Открытые методы

Метод Описание
setUp ( ) As Manager prints on stdout, we use output buffering for the tests
tearDown ( ) Clean output buffer after each test
testAdvance ( ) Tests the advance method.
testCustomReplacementRule ( ) Tests the use of custom replacements rules
testEta ( ) Tests ETA
testLowerIncrementThrowsException ( ) Tests that a lower increment throws an InvalidArgumentException
testManagerFormat ( ) Test format getter and setter
testMaxWidth ( ) Tests that the bar width does not exceed the max width specified in constructor.
testNonIntegerIncrementThrowsException ( ) Tests that a non integer increment throws an InvalidArgumentException
testProgressOverflow ( ) Tests the situation when the value given to progressbar is greater than the manager size.
testUpdate ( ) Tests update When there is still work to do : print the bar with \r When it s finished : print the bar with \n

Описание методов

setUp() публичный Метод

As Manager prints on stdout, we use output buffering for the tests
public setUp ( )

tearDown() публичный Метод

Clean output buffer after each test
public tearDown ( )

testAdvance() публичный Метод

Advancing the progress bar should make one step further.
public testAdvance ( )

testCustomReplacementRule() публичный Метод

Tests the use of custom replacements rules

testEta() публичный Метод

Tests ETA
public testEta ( )

testLowerIncrementThrowsException() публичный Метод

Tests that a lower increment throws an InvalidArgumentException

testManagerFormat() публичный Метод

Test format getter and setter
public testManagerFormat ( )

testMaxWidth() публичный Метод

Tests that the bar width does not exceed the max width specified in constructor.
public testMaxWidth ( )

testNonIntegerIncrementThrowsException() публичный Метод

Tests that a non integer increment throws an InvalidArgumentException

testProgressOverflow() публичный Метод

Tests the situation when the value given to progressbar is greater than the manager size.

testUpdate() публичный Метод

Tests update When there is still work to do : print the bar with \r When it s finished : print the bar with \n
public testUpdate ( )