Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rlerdorf committed Oct 13, 2022
1 parent be54cb1 commit 149747e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
10 changes: 4 additions & 6 deletions tests/014.phpt
Expand Up @@ -8,16 +8,14 @@ Checking timezone info with (some) empty fields
<?php

var_dump(geoip_time_zone_by_country_and_region('US','MA'));
var_dump(geoip_time_zone_by_country_and_region('US',NULL));
var_dump(geoip_time_zone_by_country_and_region('DE'));
var_dump(geoip_time_zone_by_country_and_region(NULL,''));
var_dump(geoip_time_zone_by_country_and_region(NULL,NULL));
var_dump(geoip_time_zone_by_country_and_region('',''));
var_dump(geoip_time_zone_by_country_and_region('','MA'));

?>
--EXPECTF--
string(%d) "America/%s"
bool(false)
string(%d) "Europe/%s"
string(16) "America/New_York"
string(13) "Europe/Berlin"

Warning: geoip_time_zone_by_country_and_region(): You need to specify at least the country code. in %s on line %d
bool(false)
Expand Down
9 changes: 0 additions & 9 deletions tests/016.phpt
Expand Up @@ -8,25 +8,16 @@ Checking geoip_region_name_by_code with (some) empty fields
<?php

var_dump(geoip_region_name_by_code('CA',''));
var_dump(geoip_region_name_by_code('CA',NULL));
var_dump(geoip_region_name_by_code('CA',1));
var_dump(geoip_region_name_by_code('','QC'));
var_dump(geoip_region_name_by_code(NULL,'QC'));
var_dump(geoip_region_name_by_code(1,'QC'));

?>
--EXPECTF--

Warning: geoip_region_name_by_code(): You need to specify the country and region codes. in %s on line %d
bool(false)

Warning: geoip_region_name_by_code(): You need to specify the country and region codes. in %s on line %d
bool(false)
bool(false)

Warning: geoip_region_name_by_code(): You need to specify the country and region codes. in %s on line %d
bool(false)

Warning: geoip_region_name_by_code(): You need to specify the country and region codes. in %s on line %d
bool(false)
bool(false)

0 comments on commit 149747e

Please sign in to comment.