OS X (10.7.5) に Zend Server CE をインストールしました。PEAR 経由で PHPUnit をインストールしました。
$ which pear
/usr/local/zend/bin/pear
$which php
/usr/local/zend/bin/php
$php -v
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
with Zend Extension Manager v6.0.0, Copyright (c) 2003-2013, by Zend Technologies
- with Zend Data Cache v6.0.0, Copyright (c) 2004-2013, by Zend Technologies [loaded] [licensed] [disabled]
- with Zend Job Queue v6.0.0, Copyright (c) 2004-2013, by Zend Technologies [loaded] [licensed] [enabled]
- with Zend Utils v6.0.0, Copyright (c) 2004-2013, by Zend Technologies [loaded] [licensed] [enabled]
- with Zend Optimizer+ v6.0.0, Copyright (c) 1999-2013, by Zend Technologies [loaded] [licensed] [disabled]
- with Zend Code Tracing v6.0.0, Copyright (c) 2009-2013, by Zend Technologies [loaded] [licensed] [enabled]
- with Zend Monitor v6.0.0, Copyright (c) 1999-2013, by Zend Technologies [loaded] [licensed] [disabled]
- with Zend Page Cache v6.0.0, Copyright (c) 2004-2013, by Zend Technologies [loaded] [licensed] [disabled]
$ which phpunit
/usr/local/zend/bin/phpunit
しかし、私が実行すると:
$ phpunit
test ディレクトリ内 (適切な構成とブートストラップを使用) で、次のエラーが表示されます。
/usr/local/zend/bin/phpunit: line 2: ?php: No such file or directory
/usr/local/zend/bin/phpunit: line 3: /Applications: is a directory
/usr/local/zend/bin/phpunit: line 4: Bootstrap.php: command not found
/usr/local/zend/bin/phpunit: line 5: syntax error near unexpected token `('
/usr/local/zend/bin/phpunit: line 5: ` * Copyright (c) 2001-2013, Sebastian Bergmann <sebastian@phpunit.de>.'
しかし、私が実行した場合:
$ php /usr/local/zend/bin/phpunit
すべてが機能します。
これを少し拡張させてください:
which phpdoc
戻りますが、テストフォルダー内から/usr/local/zend/bin/phpdoc
実行すると戻りますphpdoc
/usr/local/zend/bin/phpdoc: line 2: ?php: No such file or directory
/usr/local/zend/bin/phpdoc: line 3: /Applications: is a directory
/usr/local/zend/bin/phpdoc: line 4: LICENSE.txt: command not found
/usr/local/zend/bin/phpdoc: line 5: LICENSE.txt: command not found
/usr/local/zend/bin/phpdoc: line 6: LICENSE.txt: command not found
/usr/local/zend/bin/phpdoc: line 7: LICENSE.txt: command not found
/usr/local/zend/bin/phpdoc: line 8: syntax error near unexpected token `('
/usr/local/zend/bin/phpdoc: line 8: ` * @copyright 2010-2013 Mike van Riel / Naenius (http://www.naenius.com)'
なぜこれが起こっているのですか?