Symfony\Component\Console\Helper\DialogHelper::setInputStream PHP Method

setInputStream() public method

This is mainly useful for testing purpose.
public setInputStream ( resource $stream )
$stream resource The input stream
    public function setInputStream($stream)
    {
        $this->inputStream = $stream;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @param string $name
  */
 private function iExecuteCommandAndConfirm($name)
 {
     $this->dialog = $this->command->getHelper('dialog');
     $inputString = 'y' . PHP_EOL;
     $this->dialog->setInputStream($this->getInputStream($inputString));
     $this->tester->execute(['command' => $name]);
 }
All Usage Examples Of Symfony\Component\Console\Helper\DialogHelper::setInputStream