From 59c8ba7871099e1bcb4400dfca74107514fcf9d0 Mon Sep 17 00:00:00 2001 From: ericlewis Date: Sat, 5 Mar 2016 19:47:41 +0000 Subject: [PATCH] Build/Test Tools: Document PHP unit test classes. Props boonebgorges. Fixes #35494. git-svn-id: https://develop.svn.wordpress.org/trunk@36854 602fd350-edb4-49c9-b593-d223f7449a82 --- .../factory/class-wp-unittest-factory-for-thing.php | 3 +++ .../includes/factory/class-wp-unittest-factory.php | 5 +++++ tests/phpunit/includes/testcase.php | 12 ++++++++++++ 3 files changed, 20 insertions(+) diff --git a/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php b/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php index cf412c85e2..8e984572a8 100644 --- a/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php +++ b/tests/phpunit/includes/factory/class-wp-unittest-factory-for-thing.php @@ -1,5 +1,8 @@ expectedDeprecated(); } + /** + * After a test method runs, reset any state in WordPress the test method might have changed. + */ function tearDown() { global $wpdb, $wp_query, $wp, $post; $wpdb->query( 'ROLLBACK' );