Skip to content

Commit ef814a5

Browse files
committed
Update MaxMind locate test to expect correct invalid location response and wait for unlink (fixes Resource temporarily unavailable)
1 parent 2ded1cf commit ef814a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/Services/MaxMindDatabaseTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function shouldReturnInvalidLocation()
3939

4040
try {
4141
$location = $service->locate('1.1.1.1');
42-
$this->assertEquals($location->default, 'Poop'); // This should never get a chance
42+
$this->assertEquals($location->default, false);
4343
}
4444
catch (\GeoIp2\Exception\AddressNotFoundException $e) {
4545
$this->assertEquals($e->getMessage(), 'The address 1.1.1.1 is not in the database.');
@@ -55,7 +55,7 @@ public function shouldUpdateLocalDatabase()
5555

5656
$this->assertEquals($service->update(), "Database file ({$config['database_path']}) updated.");
5757

58-
unlink($config['database_path']);
58+
@unlink($config['database_path']);
5959
}
6060

6161
protected function getService()

0 commit comments

Comments
 (0)