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
This commit is contained in:
parent
d53bee91c6
commit
445b364f5b
@ -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 );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user