Example #1
0
 /**
  * @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;
 }
Example #2
0
 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");
 }