PHP: How can I tweak PHPUnit to use a different PHP interpreter?

前端 未结 6 912
误落风尘
误落风尘 2021-01-04 13:31

My system has two PHP interpreters. One came bundled with the OS and the other I installed via the XAMPP package. All of my PHP extensions are applied to the XAMPP installat

6条回答
  •  误落风尘
    2021-01-04 14:13

    This applies to phpunit installed using Homebrew on Mac OS 10.9. I’ve editing the file located at /usr/local/Cellar/phpunit/4.2.6/bin as seen below. CAVEAT: I don’t know how Homebrew will handle this on a PhpUnit update, but for now it’s working to be able to select the php version that PhpUnit is using for it's testing.

    #!/usr/bin/env bash
    
    php=/Applications/MAMP/bin/php/php5.3.14/bin/php
    #php=/Applications/MAMP/bin/php/php5.4.4/bin/php
    
    /usr/bin/env $php -d allow_url_fopen=On -d detect_unicode=Off /usr/local/Cellar/phpunit/4.2.6/libexec/phpunit-4.2.6.phar $*
    

提交回复
热议问题