openvenues / php-postal

PHP bindings to libpostal for for fast international street address parsing/normalization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make Test Fails on Expansions

Chunkford opened this issue · comments

Any ideas why it's failing on expand?

=====================================================================
PHP         : /usr/bin/php7.0
PHP_SAPI    : cli
PHP_VERSION : 7.0.30-0ubuntu0.16.04.1
ZEND_VERSION: 3.0.0
PHP_OS      : Linux - Linux ns513912 4.9.87-xxxx-std-ipv6-64 #1 SMP Tue Mar 13 18:41:47 CET 2018 x86_64
INI actual  : /home/user/repo/php-postal/tmp-php.ini
More .INIs  :
CWD         : /home/user/repo/php-postal
Extra dirs  :
VALGRIND    : Not used
=====================================================================
TIME START 2018-09-05 15:25:43
=====================================================================
FAIL Check expand [tests/001-test-expansions.phpt]
PASS Check parser [tests/002-test-parser.phpt]
=====================================================================
TIME END 2018-09-05 15:25:55

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   14
---------------------------------------------------------------------

Number of tests :    2                 2
Tests skipped   :    0 (  0.0%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    1 ( 50.0%) ( 50.0%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :    1 ( 50.0%) ( 50.0%)
---------------------------------------------------------------------
Time taken      :   12 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Check expand [tests/001-test-expansions.phpt]
=====================================================================

I've uninstalled, reinstalled, change the datadir etc and I'm running out of options.

EDIT:
If it helps, here the 001-test-expansions.log

---- EXPECTED OUTPUT
92 avenue des champs-elysees
92 avenue des champs elysees
92 avenue des champselysees
92 avenue des champs-elysees
92 avenue des champs elysees
92 avenue des champselysees
friedrichstrasse 128 berlin germany
friedrich strasse 128 berlin germany
---- ACTUAL OUTPUT
92 avenue des champs-elysees
92 avenue des champs elysees
92 avenue des champs-elysees
92 avenue des champs elysees
friedrichstrasse 128 berlin germany
friedrich strasse 128 berlin germany
---- FAILED

Also, I presume because the test is failing, then the binding won't be available in PHP?
I only need the parser, not the expansion

@albarrentine any help would be appreciated

I have the same issue.

But I think it's just the test that is wrong:
92 avenue des champselysees is NOT a valid address (champs-elysees and champs elysees are the correct answers).