2014-07-26 64 views
0

我正在使用PHPUnit測試mcrypt大量使用的項目。我已經使用this SO answer安裝了phpunit。mcrypt和PHPUnit

每當我嘗試運行phpunit,我得到以下錯誤:

Fatal error: Call to undefined function mcrypt_create_iv() in 
/files/file/using/mcrypt/thing.php on line 20 

我怎樣才能解決這個問題?我必須特別爲PHPUnit安裝mcrpyt嗎?

回答

0

您可以安裝MCrypt(無論如何您都應該這樣做)或將該特定測試標記爲requiring MCrypt。如果您沒有安裝MCrypt,後者將導致測試跳過。