public function exists(array $options = [])
{
try {
$this->info($options);
return true;
} catch (NotFoundException $e) {
return false;
}
}
public function testExistsReturnsFalse() { $this->connection->getTopic(Argument::withEntry('foo', 'bar'))->willThrow(new NotFoundException('uh oh')); $topic = new Topic($this->connection->reveal(), 'topic-name', 'project-name'); $this->assertFalse($topic->exists(['foo' => 'bar'])); }