2014-10-18 68 views
4
當我嘗試運行PHPUnit只輸出

是一個問號?PHPUnit的輸出問號

[email protected]:/$ phpunit 
[email protected]:/$ 

[email protected]:/$ phpunit --version 
[email protected]:/$ 

我得到的結果相同,如果我確實嘗試運行測試。

我然後下載的phpunit當前版本如下:

$ wget https://phar.phpunit.de/phpunit.phar 
$ php phpunit.phar --version 

去年命令的輸出是:

??r???? 

我不知道什麼是錯的。 在Ubuntu上運行php 5.3.8

+0

你有沒有嘗試過從作曲家或github的代碼版本?也許phar有問題。我從來沒有見過這樣的問題。 – SenseException 2014-10-18 21:52:58

+2

我並不積極,但你可能想嘗試在你的php.ini文件中添加'detect_unicode = Off'。有一個非常類似的問題,雖然它是與作曲家而不是phpunit。 – mschuett 2014-11-10 21:07:15

+0

有同樣的問題,這是互聯網上唯一的關於它的帖子。 @mschuett建議實際上也爲我修復了它。 – 2014-11-20 08:06:32

回答

4

只需將其添加爲答案,因爲至少我的解決方案看起來至少可以幫助另一個人。

如果您遇到此問題,極有可能是由於php版本打開了dectect_unicode。您可以簡單地修改您的php.ini文件以使其具有detect_unicode = Off,並且應該正確顯示輸出。

http://php.net/manual/en/ini.core.php#ini.zend.detect-unicode欲瞭解更多信息。

+0

謝謝* MAX_INT – Craig 2016-12-04 23:01:44