Ticket #26106: 26106.3.diff
File 26106.3.diff, 830 bytes (added by , 10 years ago) |
---|
-
tests/phpunit/tests/db.php
444 444 */ 445 445 function test_empty_where_on_update() { 446 446 global $wpdb; 447 $s how = $wpdb->show_errors(false);447 $suppress = $wpdb->suppress_errors( true ); 448 448 $wpdb->update( $wpdb->posts, array( 'post_name' => 'burrito' ), array() ); 449 449 450 450 $expected1 = "UPDATE `{$wpdb->posts}` SET `post_name` = 'burrito' WHERE "; … … 456 456 $expected2 = "UPDATE `{$wpdb->posts}` SET `post_name` = 'burrito' WHERE `post_status` = 'taco'"; 457 457 $this->assertEmpty( $wpdb->last_error ); 458 458 $this->assertEquals( $expected2, $wpdb->last_query ); 459 $wpdb->s how_errors( $show);459 $wpdb->suppress_errors( $suppress ); 460 460 } 461 461 }