Since: 1.0
Author: Bernhard Schussek (bschussek@gmail.com)
Inheritance: extends StreamInputStream
 public function testSet()
 {
     $stream = new StringInputStream(self::LOREM_IPSUM);
     $this->assertSame("Lorem ipsum dolor sit amet,\n", $stream->readLine());
     $stream->set('Foobar');
     $this->assertSame('Foobar', $stream->readLine());
     $this->assertNull($stream->readLine());
 }
Exemple #2
0
 public function testReadLineReturnsDefaultIfNotInteractive()
 {
     $this->stream->set(self::LOREM_IPSUM);
     $this->input->setInteractive(false);
     $this->assertSame('Default', $this->input->readLine('Default'));
 }