Changeset 37320 for trunk/tests/phpunit/tests/db/charset.php
- Timestamp:
- 04/28/2016 01:38:31 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/db/charset.php
r36116 r37320 17 17 public static function setUpBeforeClass() { 18 18 require_once( dirname( dirname( __FILE__ ) ) . '/db.php' ); 19 19 20 20 self::$_wpdb = new wpdb_exposed_methods_for_testing(); 21 21 } … … 892 892 $this->assertEquals( $safe_query, $stripped_query ); 893 893 } 894 895 /** 896 * @ticket 36649 897 */ 898 function test_set_charset_changes_the_connection_collation() { 899 self::$_wpdb->set_charset( self::$_wpdb->dbh, 'utf8', 'utf8_general_ci' ); 900 $results = self::$_wpdb->get_results( "SHOW VARIABLES WHERE Variable_name='collation_connection'" ); 901 $this->assertEquals( 'utf8_general_ci', $results[0]->Value ); 902 903 self::$_wpdb->set_charset( self::$_wpdb->dbh, 'utf8mb4', 'utf8mb4_unicode_ci' ); 904 $results = self::$_wpdb->get_results( "SHOW VARIABLES WHERE Variable_name='collation_connection'" ); 905 $this->assertEquals( 'utf8mb4_unicode_ci', $results[0]->Value ); 906 907 self::$_wpdb->set_charset( self::$_wpdb->dbh ); 908 } 894 909 }
Note: See TracChangeset
for help on using the changeset viewer.