부터: 1.0
저자: Bernhard Schussek (bschussek@gmail.com)
상속: extends StreamInputStream
예제 #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());
 }
예제 #2
0
 public function testReadLineReturnsDefaultIfNotInteractive()
 {
     $this->stream->set(self::LOREM_IPSUM);
     $this->input->setInteractive(false);
     $this->assertSame('Default', $this->input->readLine('Default'));
 }