From a576060403f3940eb76ed92349d78d697d544190 Mon Sep 17 00:00:00 2001 From: Christopher Allford Date: Fri, 13 Mar 2020 13:40:55 -0700 Subject: [PATCH] Replaced the strict path used in the MaxMind database download test It was set to /tmp directly instead of using the sys_get_temp_dir() method, leading to failures on systems with a different temp folder location, --- .../maxmind-geolocation/class-wc-tests-maxmind-database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-database.php b/tests/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-database.php index aba5a35a1af..e4018d93824 100644 --- a/tests/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-database.php +++ b/tests/unit-tests/integrations/maxmind-geolocation/class-wc-tests-maxmind-database.php @@ -55,7 +55,7 @@ class WC_Tests_MaxMind_Database extends WC_Unit_Test_Case { */ public function test_download_database_works() { $database_service = new WC_Integration_MaxMind_Database_Service( '' ); - $expected_database = '/tmp/GeoLite2-Country_20200100/GeoLite2-Country.mmdb'; + $expected_database = sys_get_temp_dir() . '/GeoLite2-Country_20200100/GeoLite2-Country.mmdb'; $result = $database_service->download_database( 'testing_license' );