WordPress.org

Make WordPress Core

Changeset 1108 in tests


Ignore:
Timestamp:
11/02/12 17:06:01 (3 years ago)
Author:
nacin
Message:

Update test_double_escaped_placeholders() to actually pass additional arguments to prepare().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/db.php

    r1093 r1108  
    116116    public function test_double_escaped_placeholders() { 
    117117        global $wpdb; 
    118         $sql = $wpdb->prepare( "UPDATE test_table SET string_column = '%%f is a float and %%d is an int and %%s is a string'" ); 
    119         $this->assertEquals( "UPDATE test_table SET string_column = '%f is a float and %d is an int and %s is a string'", $sql ); 
     118        $sql = $wpdb->prepare( "UPDATE test_table SET string_column = '%%f is a float, %%d is an int %d, %%s is a string', field = %s", 3, '4' ); 
     119        $this->assertEquals( "UPDATE test_table SET string_column = '%f is a float, %d is an int 3, %s is a string', field = '4'", $sql ); 
    120120    } 
    121121} 
Note: See TracChangeset for help on using the changeset viewer.