Fixed a permissions conflict caused by the dummy GeoLite2 archive's date
The test would fail if the web server had stored the data already!
This commit is contained in:
parent
95e59fc777
commit
f23c26a9f9
Binary file not shown.
|
@ -46,9 +46,15 @@ class WC_Tests_MaxMind_Database extends WC_Unit_Test_Case {
|
|||
* Tests that the database download works as expected.
|
||||
*/
|
||||
public function test_download_database_works() {
|
||||
$expected_database = '/tmp/GeoLite2-Country_20200100/GeoLite2-Country.mmdb';
|
||||
|
||||
$result = WC_MaxMind_Geolocation_Database::download_database( 'testing_license' );
|
||||
|
||||
$this->assertEquals( '/tmp/GeoLite2-Country_20200107/GeoLite2-Country.mmdb', $result );
|
||||
$this->assertEquals( $expected_database, $result );
|
||||
|
||||
// Remove the downloaded file and folder.
|
||||
unlink( $expected_database );
|
||||
rmdir( dirname( $expected_database ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue