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()); }
public function testReadLineReturnsDefaultIfNotInteractive() { $this->stream->set(self::LOREM_IPSUM); $this->input->setInteractive(false); $this->assertSame('Default', $this->input->readLine('Default')); }