diff --git a/tests/phpunit/tests/db.php b/tests/phpunit/tests/db.php index e66646393e..0fbd6218ba 100644 --- a/tests/phpunit/tests/db.php +++ b/tests/phpunit/tests/db.php @@ -444,7 +444,7 @@ class Tests_DB extends WP_UnitTestCase { */ function test_empty_where_on_update() { global $wpdb; - $show = $wpdb->show_errors(false); + $suppress = $wpdb->suppress_errors( true ); $wpdb->update( $wpdb->posts, array( 'post_name' => 'burrito' ), array() ); $expected1 = "UPDATE `{$wpdb->posts}` SET `post_name` = 'burrito' WHERE "; @@ -456,6 +456,6 @@ class Tests_DB extends WP_UnitTestCase { $expected2 = "UPDATE `{$wpdb->posts}` SET `post_name` = 'burrito' WHERE `post_status` = 'taco'"; $this->assertEmpty( $wpdb->last_error ); $this->assertEquals( $expected2, $wpdb->last_query ); - $wpdb->show_errors( $show ); + $wpdb->suppress_errors( $suppress ); } }