Class ConsoleInput
Stub class used by the console integration harness.
This class enables input to be stubbed and have exceptions raised when no answer is available.
- Cake\Console\ConsoleInput
-
Cake\TestSuite\Stub\ConsoleInput
Properties summary
-
$currentIndex
protectedinteger
Current message index -
$replies
protectedarray
Reply values for ask() and askChoice()
Inherited Properties
Method Summary
-
__construct() public
Constructor -
dataAvailable() public
Check if data is available on stdin -
read() public
Read a reply
Method Detail
__construct() public ¶
__construct( array $replies )
Constructor
Parameters
- array $replies
- A list of replies for read()
Overrides
dataAvailable() public ¶
dataAvailable( integer $timeout = 0 )
Check if data is available on stdin
Parameters
- integer $timeout optional 0
- An optional time to wait for data
Returns
boolean
True for data available, false otherwise
True for data available, false otherwise