Since: 1.0
Author: Bernhard Schussek (bschussek@gmail.com)
Inheritance: extends StreamInputStream
Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
 public function testReadLineReturnsDefaultIfNotInteractive()
 {
     $this->stream->set(self::LOREM_IPSUM);
     $this->input->setInteractive(false);
     $this->assertSame('Default', $this->input->readLine('Default'));
 }