/** * Manually flush buffered output. */ public function flushBuffer() { $content = $this->format($this->buffer->flush()); if (!$this->is(OutputVerbosity::SILENT)) { fwrite($this->getOutputStream(), $content); } }
function it_writes_and_flushes_buffer(IOutputBuffer $buffer) { $buffer->write('text')->shouldBeCalled(); $buffer->flush()->shouldBeCalled(); $this->write('text'); }