/** * Deletes the storage with the given id. * * @param int $id storage id * * @return DataResponse */ public function destroy($id) { try { $this->service->removeStorage($id); } catch (NotFoundException $e) { return new DataResponse(['message' => (string) $this->l10n->t('Storage with id "%i" not found', array($id))], Http::STATUS_NOT_FOUND); } return new DataResponse([], Http::STATUS_NO_CONTENT); }
/** * @expectedException \OCA\Files_external\NotFoundException */ public function testDeleteUnexistingStorage() { $this->service->removeStorage(255); }