public function exists(array $options = [])
{
try {
$this->info($options);
return true;
} catch (NotFoundException $e) {
return false;
}
}
public function testExistsNotFound() { $this->connection->getSubscription(Argument::any())->willThrow(new NotFoundException('bad'))->shouldBeCalledTimes(1); $subscription = new Subscription($this->connection->reveal(), 'subscription-name', 'topic-name', 'project-id'); $this->assertFalse($subscription->exists()); }