public function testDrainAndFullDrainAfterWrite()
{
$stream = fopen('php://temp', 'r+');
$loop = $this->createLoopMock();
$buffer = new Buffer($stream, $loop);
$buffer->softLimit = 2;
$buffer->on('drain', $this->expectCallableOnce());
$buffer->on('full-drain', $this->expectCallableOnce());
$buffer->write("foo");
$buffer->handleWrite();
}