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.
        
    Namespace: Cake\TestSuite\Stub
    
    
    
      
  
      Property Summary
- 
        $_canReadline protectedboolCan this instance use readline? Two conditions must be met: - Readline support must be enabled.
- Handle we are attached to must be stdin. Allows rich editing with arrow keys and history when inputting a string.
 
- 
        $_input protectedresourceInput value. 
- 
        $currentIndex protectedintCurrent message index 
- 
        $replies protectedstring[]Reply values for ask() and askChoice() 
Method Summary
- 
          __construct() publicConstructor 
- 
          dataAvailable() publicCheck if data is available on stdin 
- 
          read() publicRead a reply 
Method Detail
__construct() ¶ public
__construct(string[] $replies)Constructor
Parameters
- 
                string[]$replies
- A list of replies for read() 
dataAvailable() ¶ public
dataAvailable(int $timeout = 0): boolCheck if data is available on stdin
Parameters
- 
                int$timeout optional
- An optional time to wait for data 
Returns
boolTrue for data available, false otherwise
Property Detail
$_canReadline ¶ protected
Can this instance use readline? Two conditions must be met:
- Readline support must be enabled.
- Handle we are attached to must be stdin. Allows rich editing with arrow keys and history when inputting a string.
Type
bool