I am getting this exception when trying to run my PHP unit tests:
Fatal error: Call to undefined function openssl_random_pseudo_bytes()
I had the same issue. I solved it by editing my php.ini file - changing ;extension=php_openssl.dll to extension=php_openssl.dll .
;extension=php_openssl.dll
extension=php_openssl.dll
(For my installation, my php.ini file was located in my P:\Program Files\EasyPHP-12.1\conf_files\ directory.)
P:\Program Files\EasyPHP-12.1\conf_files\