Unable to write test cases for a WordPress plugin using PHPUnit and WP-CLI

Is the plugin_method() publicly available? Check whether it is a class method or belongs to a namespace.

If it belongs to a class, then you have to create an object of the class before you can call the method. Similarly if it is a namespace method, then you have to call the function with the full namespace.

Leave a Comment