how to use Error: transliterator_transliterate() with phpunit on wercker?

790 Views Asked by At

I'm using box: php:7.1-fpm in wercker In my code I'm using function transliterator_transliterate()

It works locally and on the server, however when running tests in wercker it is displaying error

Error: Call to undefined function \Utils\transliterator_transliterate()

Mo code is:

$string = transliterator_transliterate('Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove', $string);

I already tried these solutions.

1. \transliterator_transliterate('Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove', $string);

 2. added pear and php5-intl to wercker config

    - script:
        name: add pear
        code: |
          sudo apt-get install -y php-pear php5-intl
          # Configure PEAR
          pear config-set php_ini /etc/php5/cli/php.ini
          pecl config-set php_ini /etc/php5/cli/php.ini

Is there any method to check if pear is working properly or solution to make transliterator_transliterate() working?

0

There are 0 best solutions below