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
array<string>
Reply values for ask() and askChoice()
Constructor
Check if data is available on stdin
Read a reply
__construct(array<string> $replies)
Constructor
array<string>
$replies A list of replies for read()
dataAvailable(int $timeout = 0): bool
Check if data is available on stdin
int
$timeout optional An optional time to wait for data
bool
read(): string
Read a reply
string
Can this instance use readline? Two conditions must be met:
bool
Input value.
resource
Current message index
int
Reply values for ask() and askChoice()
array<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.4/class-Cake.Console.TestSuite.StubConsoleInput.html