public function testDoWrite() { $output = new StreamOutput($this->stream); $output->writeln('foo'); rewind($output->getStream()); $this->assertEquals('foo' . PHP_EOL, stream_get_contents($output->getStream()), '->doWrite() writes to the stream'); }