0

I am using PHPUnit to test a project where mcrypt is heavily used. I have installed phpunit using this SO answer.

Whenever I try and run phpunit, I get the following error:

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

How can I fix this error? Do I have to install mcrpyt especially for PHPUnit?

Community
  • 1
  • 1
Jason Silberman
  • 2,471
  • 6
  • 29
  • 47

1 Answers1

0

You can either install MCrypt (which you should do anyway) or mark that specific test as one requiring MCrypt. The latter will cause the test to be skipped if you don't have MCrypt installed.

Narf
  • 14,600
  • 3
  • 37
  • 66