Stub class used by the console integration harness.
This class enables input to be stubbed and have exceptions raised when no answer is available.
bool
Can this instance use readline? Two conditions must be met:
resource
Input value.
int
Current message index
string[]
Reply values for ask() and askChoice()
__construct(array $replies)
Constructor
string[]
$replies A list of replies for read()
dataAvailable(mixed $timeout)
Check if data is available on stdin
int
$timeout optional An optional time to wait for data
bool
True for data available, false otherwise
read()
Read a reply
string
The value of the reply
Can this instance use readline? Two conditions must be met:
bool
Input value.
resource
Current message index
int
Reply values for ask() and askChoice()
string[]
© 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/4.1/class-Cake.TestSuite.Stub.ConsoleInput.html