I work in a wordpress with a lot of classes that use wordpress functions and i'd like make unit tests for them. The problem I found is that phpunit doesn't recognize wordpress functions and the tests doesn't work.
I tried to include in the test class the index.php, wp-load.php and when are included, phpunit doesn't work and exit throught "exit code 0" without do nothing -the error is shown in the PhpStorm Terminal, if i execute the command in the cmd, the cmd doesn't thrown any information, just a blank line.
Php Version: 7.3.3 PhpUnit Version: 7.5.9 Wordpress Version: 4.9.1
An example for a error is test for a class with "add_action" in their constructor and the error is: "Call to undefined function add_action()". I don't know what file i had to include for doing work this test or what is the method to test the class correctly.