Plugin development with unit tests

The unit tests transform all CREATE TABLE and DROP TABLE queries to CREATE TEMPORARY TABLE and DROP TEMPORARY TALBE, respectively. So in your tearDown the query will attempt to drop temporary tables with those names, but not the actual tables. To fix this, add this before your DROP queries: remove_filter( ‘query’, array( $this, ‘_drop_temporary_tables’ ) … Read more

WP_UnitTestCase missing?

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

struggling to set up WP tests

I have a setup similar to yours, with MAMP. I also have had this problem with PHPUnit. It seems that no matter what you do, PHPUnit does not recognize the include_path from MAMP. You have to add the correct path to the php.ini in /private/etc/.