public function testUnpack() { $this->bufferUnpacker->expects($this->once())->method('reset')->with('foo')->willReturn($this->bufferUnpacker); $this->bufferUnpacker->expects($this->once())->method('unpack')->willReturn('bar'); $this->assertSame('bar', $this->unpacker->unpack('foo')); }