php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61834 tests/014.phpt does not work for GeoIP library version 1.4.5 or later
Submitted: 2012-04-24 11:54 UTC Modified: 2014-04-28 12:30 UTC
From: solo at altlinux dot ru Assigned: ohill (profile)
Status: Closed Package: geoip (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2012-04-24 11:54 UTC] solo at altlinux dot ru
Description:
------------
FAIL Checking timezone info with (some) empty fields [tests/014.phpt]

  The original call is used tests/014.phpt geoip_time_zone_by_country_and_region() with parameter country='CA' and an empty parameter region. In this case, it is expected that this function should return "America/..." But when using GeoIP library version 1.4.5 or later these calls return error indication (false), because the function is used GeoIP_time_zone_by_country_and_region() for the country='CA' was to require the mandatory indication of correct region.

  Suggest to replace the country 'CA' in the meaning which does not require you to specify the correct region. For example in the 'CF' (see http://git.altlinux.org/people/solo/packages/pecl-geoip.git?p=pecl-geoip.git;a=blobdiff;f=tests/014.phpt;h=f53078627b052da2bf7abe1840560255298a4ae5;hp=a673963cb31206f0bfee9e1fee05f172feedff2e;hb=b1912fa9e8a1a88fa609d9dfcbbda7d50b75148f;hpb=6b8cc6459a7955c762ae782e384a0c06dca14ed8).

Test script:
---------------
  When using the GeoIP library version 1.4.5 or later:

$ make test

Expected result:
----------------
...
PASS Checking timezone info with (some) empty fields [tests/014.phpt]
...
Number of tests :   15                15
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    0 (  0.0%) (  0.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :   15 (100.0%) (100.0%)
---------------------------------------------------------------------
Time taken      :    5 seconds
=====================================================================


Actual result:
--------------
...
FAIL Checking timezone info with (some) empty fields [tests/014.phpt]
...
Number of tests :   15                15
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    1 (  6.7%) (  6.7%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :   14 ( 93.3%) ( 93.3%)
---------------------------------------------------------------------
Time taken      :    4 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Checking timezone info with (some) empty fields [tests/014.phpt]
=====================================================================


Patches

0001-tests-014.phpt-Fix-checking-timezone-info-with-some-.patch (last revision 2012-04-24 11:55 UTC by solo at altlinux dot ru)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-28 12:30 UTC] ohill@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: ohill
 [2014-04-28 12:30 UTC] ohill@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 03:01:28 2024 UTC