Running 'testthat.r'
Running the tests in 'tests/testthat.r' failed.
Complete output:
  > # Run all unit tests
  > 
  > # This is a wrapper around all the tests specified
  > # in the tests/testthat directory. These tests are visible
  > # to users and serve as small examples as well.
  > testthat::test_check("foto")
  Loading required package: foto
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_foto.R:11:3): test zones ────────────────────────────────────────
  Error: Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
       █
    1. ├─testthat::expect_output(str(foto(x = raster::raster(x), plot = FALSE))) test_foto.R:11:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─testthat::capture_output_lines(code, print, width = width)
    5. │   │   └─testthat:::eval_with_output(code, print = print, width = width)
    6. │   │     ├─withr::with_output_sink(temp, withVisible(code))
    7. │   │     │ └─base::force(code)
    8. │   │     └─base::withVisible(code)
    9. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. ├─utils::str(foto(x = raster::raster(x), plot = FALSE))
   11. ├─foto::foto(x = raster::raster(x), plot = FALSE)
   12. │ └─base::grepl("Raster", class(x))
   13. │   └─base::is.factor(x)
   14. ├─raster::raster(x)
   15. └─raster::raster(x)
   16.   └─raster:::.local(x, ...)
   17.     └─raster:::.rasterObjectFromFile(...)
  ── Error (test_foto.R:30:3): test mw ───────────────────────────────────────────
  Error: error in evaluating the argument 'x' in selecting a method for function 'crop': Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  Backtrace:
      █
   1. ├─raster::crop(...) test_foto.R:30:2
   2. ├─raster::raster(...)
   3. ├─raster::raster(...)
   4. │ └─raster:::.local(x, ...)
   5. │   └─raster:::.rasterObjectFromFile(...)
   6. │     └─base::stop("Cannot create RasterLayer object from this file; perhaps you need to install rgdal first")
   7. └─base::.handleSimpleError(...)
   8.   └─base:::h(simpleError(msg, call))
  
  [ FAIL 2 | WARN 0 | SKIP 0 | PASS 2 ]
  Error: Test failures
  Execution halted