When reading CRAN section of the current R Journal (https://journal.r-project.org/archive/2018-2/cran.pdf) I have noticed that CRAN packages depending on Internet resources are now expected to fail gracefully with message (and not an error or warning) if internet resources are unavailable.
I maintain a package which I ought to update in this manner (at present it throws an error with stop('No internet connection or data source broken.').
This brings me to a more general question, namely that I would prefer to have this behaviour a part of unit tests (I use Travis running testthat and covr::codecov()). I am however not aware of a technique how to trick testthat on Travis into an offline mode.
Any advice on creating such a unit test are highly appreciated!