PHPUnit Testing in Phpstorm

PHPUnit Testing in Phpstorm

by Touma Kamijou -
Number of replies: 3

Hi there! I'm new to Moodle and I've been trying to set up Phpstorm to run PhpUnit Testing. However, I am bothered why whenever I run php admin\tool\phpunit\cli\init.php, I keep on getting:

 even though php_extension intl is already enabled. Please do enlighten me with this.

Average of ratings: -
In reply to Touma Kamijou

Re: PHPUnit Testing in Phpstorm

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hello,
please run php -m to look at the actual list of installed extensions and php --ri intl for the "bad" extension.

HTH,
Matteo

Average of ratings: Useful (1)
In reply to Touma Kamijou

Re: PHPUnit Testing in Phpstorm

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The thing to be aware of (I think) is that there are sometimes two separate php.ini files. One is used when running things from the command line (like PHPunit) and a different one is used when PHP is running under Apache or IIS.

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: PHPUnit Testing in Phpstorm

by Touma Kamijou -

Thanks! I somehow figured it out. It seems that having multiple version of XAMPP installed gives me that problem.