From 445b364f5b7896c47a3581758cf8ca3f4bc9218c Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 4 Sep 2014 04:30:11 +0000 Subject: [PATCH] Properly suppress errors in test_empty_where_on_update(), which expects an empty WHERE clause. see #26106. git-svn-id: https://develop.svn.wordpress.org/trunk@29701 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/db.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); } }