function it_read_the_pipe(Pipe $input) { $input->read()->shouldBeCalled(1); $input->read()->willReturn('the content'); $this->read()->shouldReturn('the content'); }
/** * {@inheritDoc} */ public function write($content) { $this->writer->write($content); return $this; }
function it_write_into_the_pipe(Pipe $pipe) { $pipe->write('test')->shouldBeCalled(1); $this->write('test')->shouldReturn($this); }
function it_read_the_content_of_the_pipe() { $pipe = new Pipe('/tmp/spec_file'); $pipe->write('the content'); $this->read()->shouldReturn('the content'); }
/** * {@inheritDoc} */ public function read() { return $this->reader->read(); }