Running ‘spelling.R’
  Running ‘testthat.R’ [1093s/547s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(PatientProfiles)
  > 
  > test_check("PatientProfiles")
  Starting 2 test processes
  [ FAIL 5 | WARN 236 | SKIP 0 | PASS 582 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-addDemographics.R:264:3'): partial demographics - omop tables ──
  c("sex") %in% names(cdm$cohort1b) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-addPriorObservation.R:178:3'): different name ────────────────
  "ph" %in% names(cdm$condition_occurrence) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Error ('test-addSex.R:16:3'): addSex, works in both cohort and condition tables ──
  Error in `cdm$cohort1$sex`: The `$` method of <tbl_lazy> is for internal use only.
  i Use `dplyr::pull()` to get the values in a column.
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-addSex.R:16:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─cdm$cohort1$sex
   5. └─dbplyr:::`$.tbl_lazy`(cdm$cohort1, sex)
   6.   └─cli::cli_abort(...)
   7.     └─rlang::abort(...)
  ── Error ('test-addSex.R:25:3'): addSex, desired result for all parameters ─────
  Error in `cdm$cohort2$sex`: The `$` method of <tbl_lazy> is for internal use only.
  i Use `dplyr::pull()` to get the values in a column.
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-addSex.R:25:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─cdm$cohort2$sex
   5. └─dbplyr:::`$.tbl_lazy`(cdm$cohort2, sex)
   6.   └─cli::cli_abort(...)
   7.     └─rlang::abort(...)
  ── Error ('test-addIntersect.R:71:3'): working examples ────────────────────────
  Error in `result$xx`: The `$` method of <tbl_lazy> is for internal use only.
  i Use `dplyr::pull()` to get the values in a column.
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-addIntersect.R:71:3
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─result$xx
   5. └─dbplyr:::`$.tbl_lazy`(result, xx)
   6.   └─cli::cli_abort(...)
   7.     └─rlang::abort(...)
  
  [ FAIL 5 | WARN 236 | SKIP 0 | PASS 582 ]
  Error: Test failures
  Execution halted