I am getting this exception when trying to run my PHP unit tests:
Fatal error: Call to undefined function openssl_random_pseudo_bytes()
What does it mean?
It means you do not have the openssl extension enabled in your PHP install. It needs to be enabled for you to use openssl_* functions.
It means you possibly don't have openssl enabled.
If you are on windows its even easier to load it. Enable it from wamp icon on system tray.


Your php installation either does not have openssl enabled, or you could be running a version of php < 5.3.
To enable openssl, you must re-compile and install php with the "–with-openssl" flag. See php installation documentation
For me this error occurred because i had not configured openssl correctly for my PHP. This is the exact step i followed to rectify this error. https://stackoverflow.com/a/36070260/1221096