WordPress.org

Ready to get started?Download WordPress

Forums

wp-unit
Poor documentation (2 posts)

  1. cristiroma
    Member
    Posted 2 years ago #

    When I wrote a test

    class MyTest extends PHPUnit_Framework_TestCase {

    I get

    Fatal error: Class 'PHPUnit_Framework_TestCase' not found in /home/test/workspace/myproject/www/wp-content/plugins/myth/tests/tests.php on line 33

    Is there any documentation on how to actually implement these tests? Do I need to use require_once?
    Is there a problem with plugins loaded in wrong order?

    http://wordpress.org/extend/plugins/wp-unit/

  2. Nuno Morgadinho
    Member
    Plugin Contributor

    Posted 2 years ago #

    Every unit test must be included in the 'testcase' folder you will find under the wp-unit plugin directory. Also you'll find a couple of examples there to help you get started.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags