public function stream_writeTest() { $data = 'foo bar'; $this->mockStreamWrapper->expects($this->once())->method('write')->with($data)->will($this->returnValue(true)); $this->assertTrue($this->streamWrapperAdapter->stream_write($data)); }