Running ‘testthat.r’ [2s/3s]
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
  ── 1. Error: test zones (@test_foto.R#11)  ─────────────────────────────────────
  Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  1: expect_output(str(foto(x = raster::raster(x), plot = FALSE))) at testthat/test_foto.R:11
  2: quasi_capture(enquo(object), label, capture_output, width = width)
  3: .capture(act$val <- eval_bare(get_expr(.quo), get_env(.quo)), ...)
  4: capture_output_lines(code, print, width = width)
  5: eval_with_output(code, print = print, width = width)
  6: withr::with_output_sink(temp, withVisible(code))
  7: force(code)
  8: withVisible(code)
  9: eval_bare(get_expr(.quo), get_env(.quo))
  10: str(foto(x = raster::raster(x), plot = FALSE))
  11: foto(x = raster::raster(x), plot = FALSE)
  12: grepl("Raster", class(x))
  13: raster::raster(x)
  14: raster::raster(x)
  15: .local(x, ...)
  16: .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", ...)
  17: stop("Cannot create RasterLayer object from this file; perhaps you need to install rgdal first")
  
  ── 2. Error: test mw (@test_foto.R#30)  ────────────────────────────────────────
  Cannot create RasterLayer object from this file; perhaps you need to install rgdal first
  1: raster::crop(raster::raster(system.file("extdata", "yangambi.png", package = "foto", 
         mustWork = TRUE)), raster::extent(1, 30, 1, 30)) at testthat/test_foto.R:30
  2: raster::raster(system.file("extdata", "yangambi.png", package = "foto", mustWork = TRUE))
  3: raster::raster(system.file("extdata", "yangambi.png", package = "foto", mustWork = TRUE))
  4: .local(x, ...)
  5: .rasterObjectFromFile(x, band = band, objecttype = "RasterLayer", ...)
  6: stop("Cannot create RasterLayer object from this file; perhaps you need to install rgdal first")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 2 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 2 ]
  1. Error: test zones (@test_foto.R#11) 
  2. Error: test mw (@test_foto.R#30) 
  
  Error: testthat unit tests failed
  Execution halted