Using WP-CLI and Laragon for plugin testing


  • | 182 points

    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.


  • | 182 points

    Solved!

    In install-wp-tests.sh, changed "mysqladmin" on line 150 to /C/laragon/bin/mysql/mysql-5.7.24-winx64/bin/mysqladmin.exe


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.