public function testModifyAckDeadlineBatch()
{
$ackIds = ['foobar', 'otherAckId'];
$messages = [];
foreach ($ackIds as $id) {
$messages[] = new Message([], ['ackId' => $id]);
}
$seconds = 100;
$this->connection->modifyAckDeadline(Argument::that(function ($args) use($ackIds, $seconds) {
if ($args['foo'] !== 'bar') {
return false;
}
if ($args['ackIds'] !== $ackIds) {
return false;
}
if ($args['ackDeadlineSeconds'] !== $seconds) {
return false;
}
return true;
}))->shouldBeCalledTimes(1);
$this->subscription->setConnection($this->connection->reveal());
$this->subscription->modifyAckDeadlineBatch($messages, $seconds, ['foo' => 'bar']);
}