diff --git a/R/load_fb.R b/R/load_fb.R index d11c8b5d..7830ef82 100644 --- a/R/load_fb.R +++ b/R/load_fb.R @@ -261,7 +261,7 @@ load_fb_match_summary <- function(country, gender, tier, season_end_year = NA) { tier ) - res <- purrr::map_dfr(urls, worldfootballR:::.file_reader) + res <- purrr::map_dfr(urls, .file_reader) if(nrow(res) == 0) { cli::cli_alert("Data not loaded. Please check parameters.") diff --git a/tests/testthat/test-transfermarkt.R b/tests/testthat/test-transfermarkt.R index be8b9d51..88f9849e 100644 --- a/tests/testthat/test-transfermarkt.R +++ b/tests/testthat/test-transfermarkt.R @@ -12,20 +12,23 @@ test_that("tm_player_market_values() works", { }) - -test_that("tm_player_transfer_history() works", { - testthat::skip_if_offline() - testthat::skip_on_cran() - - transfer_data <- tm_player_transfer_history(c("https://www.transfermarkt.com/cristiano-ronaldo/profil/spieler/8198")) - # test the functions returns the data - expect_type(transfer_data, "list") - expect_true(ncol(transfer_data) != 0) - - # test that an invalid country will error - expect_error(tm_player_transfer_history("aaa.com.au")) - -}) +##-------------------------------------------------------------------------------------- +# As at version 0.6.4.0012, commenting out this test as the data is no longer available +# by static scraping and will need to incorporate some form of browser automation +##-------------------------------------------------------------------------------------- +# test_that("tm_player_transfer_history() works", { +# testthat::skip_if_offline() +# testthat::skip_on_cran() +# +# transfer_data <- tm_player_transfer_history(c("https://www.transfermarkt.com/cristiano-ronaldo/profil/spieler/8198")) +# # test the functions returns the data +# expect_type(transfer_data, "list") +# expect_true(ncol(transfer_data) != 0) +# +# # test that an invalid country will error +# expect_error(tm_player_transfer_history("aaa.com.au")) +# +# }) test_that("tm_team_transfers() works", {