/** * @param string $string * @param int $options * * @return IOutput * * @see OutputVerbosity * @see OutputProcessing */ public function write($string, $options = null) { if ($options === null) { $options = OutputVerbosity::NORMAL; } if ($this->is($options)) { $this->buffer->write($string); if (!$this->isBufferingEnabled()) { $this->flushBuffer(); } } return $this; }
function it_writes_line_indented(IOutputBuffer $buffer) { $this->setEnableBuffering(true); $buffer->write(" first line \n second line\n")->shouldBeCalled(); $this->writeLineIndented("first line \n second line"); }