Ticket #19861: 19861-unit-test.patch
File 19861-unit-test.patch, 654 bytes (added by , 12 years ago) |
---|
-
tests/db.php
78 78 // Restore locale 79 79 setlocale( LC_ALL, $current_locale ); 80 80 } 81 82 /** 83 * Test that an escaped %%f is not altered 84 * @ticket 19861 85 */ 86 public function test_double_escaped_placeholders() { 87 global $wpdb; 88 $sql = $wpdb->prepare( "UPDATE test_table SET string_column = '%%f is a float and %%d is an int and %%s is a string'" ); 89 $this->assertEquals( "UPDATE test_table SET string_column = '%f is a float and %d is an int and %s is a string'", $sql ); 90 } 81 91 }