public function exists() { try { $this->connection->getBucket($this->identity + ['fields' => 'name']); } catch (NotFoundException $ex) { return false; } return true; }
public function testDoesExistFalse() { $this->connection->getBucket(Argument::any())->willThrow(new NotFoundException(null)); $bucket = new Bucket($this->connection->reveal(), 'bucket'); $this->assertFalse($bucket->exists()); }