コード例 #1
0
 function it_read_the_pipe(Pipe $input)
 {
     $input->read()->shouldBeCalled(1);
     $input->read()->willReturn('the content');
     $this->read()->shouldReturn('the content');
 }
コード例 #2
0
 /**
  * {@inheritDoc}
  */
 public function write($content)
 {
     $this->writer->write($content);
     return $this;
 }
コード例 #3
0
 function it_write_into_the_pipe(Pipe $pipe)
 {
     $pipe->write('test')->shouldBeCalled(1);
     $this->write('test')->shouldReturn($this);
 }
コード例 #4
0
ファイル: PipeSpec.php プロジェクト: pedrotroller/phpetroleum
 function it_read_the_content_of_the_pipe()
 {
     $pipe = new Pipe('/tmp/spec_file');
     $pipe->write('the content');
     $this->read()->shouldReturn('the content');
 }
コード例 #5
0
 /**
  * {@inheritDoc}
  */
 public function read()
 {
     return $this->reader->read();
 }