Tests: Remove unnecessary setUp() and tearDown() methods in multisite tests.

These were originally added in [26252] to suppress database errors on `setUp()` and restore on `tearDown()` for tests that call `wpmu_create_blog()`, blog factory, or installation code that attempts to clear transients.

As the multisite test coverage expanded, these methods ended up being unnecessarily copied into other test classes, where database error suppression is not required.

Follow-up to [26252], [29916], [30286], [33184], [34898], [34899], [34901], [37234], [37477], [37894], [49212], [49616], [51859].

See #53363.

git-svn-id: https://develop.svn.wordpress.org/trunk@51869 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-09-25 01:27:47 +00:00
parent 284764c658
commit 364dfec369
12 changed files with 11 additions and 151 deletions
-13
View File
@@ -8,19 +8,6 @@ if ( is_multisite() ) :
* @group multisite
*/
class Tests_Multisite extends WP_UnitTestCase {
protected $suppress = false;
function set_up() {
global $wpdb;
parent::set_up();
$this->suppress = $wpdb->suppress_errors();
}
function tear_down() {
global $wpdb;
$wpdb->suppress_errors( $this->suppress );
parent::tear_down();
}
function test_wpmu_log_new_registrations() {
global $wpdb;