I was looking at tests for wordpress and some, if not all the classes have WP_UnitTestCase but I cannot find the class, why do I care? I have downloaded The most up to date version of this from github which is the same set of tests.

Why does this matter so much? Because when ever I run one of the tests via phpunit filename.php I get the error from php unit stating that its missing WP_UnitTestCase.

So my question is:

Where is this class, why is it missing if it works for the WordPress developers?

  • We don't know anything about your process. You did follow this tutorial?
    – kaiser
    Feb 7, 2013 at 6:11

1 Answer 1


This class is defined in includes/testcase.php. If you checkout the entire repo, you should have it. To check out the entire repo, you should be running something along the lines of:

svn co https://unit-tests.svn.wordpress.org/trunk wordpress-tests

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.