Using WP-CLI and Laragon for plugin testing
-
Hi
I've run into some issue setting up unit testing for WordPress plugins using PHPUnit.
Following this guide for setting it up, I've run into a problem with the command "bin/install-wp-tests.sh wordpress_test root '' localhost latest".
Cmder appears to use Git Bash to execute this command and I get the error "install-wp-tests.sh: line 150: mysqladmin: command not found".
I've tried adding "C:\laragon\bin\mysql\mysql-5.7.24-winx64\bin" to PATH for "mysqladmin.exe". However, it still won't recognize it.
-
Solved!
In install-wp-tests.sh, changed "mysqladmin" on line 150 to /C/laragon/bin/mysql/mysql-5.7.24-winx64/bin/mysqladmin.exe