On this page
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
-
$replies
protectedarray
Inherited Properties
Method Summary
-
__construct() publicConstructor
-
dataAvailable() publicCheck if data is available on stdin
-
read() publicRead a reply
Method Detail
__construct()source public
__construct( array $replies )
Constructor
Parameters
-
array
$replies
- A list of replies for read()
Overrides
Cake\Console\ConsoleInput::__construct()
dataAvailable()source 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
booleanTrue for data available, false otherwise
Overrides
Cake\Console\ConsoleInput::dataAvailable()
read()source public
read( )
Read a reply
Returns
mixedThe value of the reply
Overrides
Cake\Console\ConsoleInput::read()
Properties detail
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.8/class-Cake.TestSuite.Stub.ConsoleInput.html