From b171b64d3ceaa1cb9d4ad1f88bd2d27f2fb2ce22 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Mon, 12 Dec 2016 23:17:35 +0000 Subject: [PATCH] Tests: Use `wp_delete_user()` during teardown to delete a single site's user. Fixes failing tests for `get_dashboard_url()`. Fixes #39065. git-svn-id: https://develop.svn.wordpress.org/trunk@39590 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/link/getDashboardUrl.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/tests/link/getDashboardUrl.php b/tests/phpunit/tests/link/getDashboardUrl.php index b91edc7da8..4a6be8b901 100644 --- a/tests/phpunit/tests/link/getDashboardUrl.php +++ b/tests/phpunit/tests/link/getDashboardUrl.php @@ -11,7 +11,11 @@ class Tests_Link_GetDashboardUrl extends WP_UnitTestCase { } public static function wpTearDownAfterClass() { - wpmu_delete_user( self::$user_id ); + if ( is_multisite() ) { + wpmu_delete_user( self::$user_id ); + } else { + wp_delete_user( self::$user_id ); + } } /**