Google\Cloud\Tests\PubSub\SubscriptionTest::testModifyAckDeadline PHP Method

testModifyAckDeadline() public method

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