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

testAcknowledge() public method

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