public function testMultipleFlushesWithMultiplePayloads()
{
$expected = array(array(1, 2), array(3, 4));
$this->queue->queue('event', array(1));
$this->queue->queue('event', array(3));
$this->queue->on('event', function ($event, $number) {
return $number;
});
$this->queue->on('event', function ($event, $number) {
return $number + 1;
});
$result = $this->queue->flush('event');
$this->assertEquals($expected, $result);
}