public modifyPushConfig ( array $pushConfig, array $options = [] ) : void | ||
$pushConfig | array | { Push delivery configuration. See [PushConfig](https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions#PushConfig) for more details. @type string $pushEndpoint A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push". @type array $attributes Endpoint configuration attributes. } |
$options | array | [optional] Configuration Options |
return | void |
public function modifyPushConfig(array $pushConfig, array $options = [])
{
$this->connection->modifyPushConfig($options + ['subscription' => $this->name, 'pushConfig' => $pushConfig]);
}
public function testModifyPushConfig() { $config = ['hello' => 'world']; $this->connection->modifyPushConfig(Argument::that(function ($args) use($config) { if ($args['foo'] !== 'bar') { return false; } if ($args['pushConfig'] !== $config) { return false; } return true; }))->shouldBeCalledTimes(1); $subscription = new Subscription($this->connection->reveal(), 'subscription-name', 'topic-name', 'project-id'); $subscription->modifyPushConfig($config, ['foo' => 'bar']); }