public function testUnbindingStreamPreventsFurtherWrites()
{
$this->initializeBuffer();
$is1 = $this->createMockInputStream();
$is2 = $this->createMockInputStream();
$is1->expects($this->at(0))->method('write')->with('x');
$is1->expects($this->at(1))->method('write')->with('y');
$is2->expects($this->once())->method('write')->with('x');
$this->buffer->bind($is1);
$this->buffer->bind($is2);
$this->buffer->write('x');
$this->buffer->unbind($is2);
$this->buffer->write('y');
}