mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 11:14:36 +00:00
WPDB: When checking that a string can be sent to MySQL, we shouldn't use mb_convert_encoding(), as it behaves differently to MySQL's character encoding conversion.
Props mdawaffe, pento, nbachiyski, jorbin, johnjamesjacoby, jeremyfelt. See #32165. git-svn-id: https://develop.svn.wordpress.org/trunk@32364 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -121,7 +121,8 @@ class Tests_Comment extends WP_UnitTestCase {
|
||||
$_SERVER['REMOTE_ADDR'] = '';
|
||||
}
|
||||
|
||||
$post_id = $this->factory->post->create();
|
||||
$u = $this->factory->user->create();
|
||||
$post_id = $this->factory->post->create( array( 'post_author' => $u ) );
|
||||
|
||||
$data = array(
|
||||
'comment_post_ID' => $post_id,
|
||||
@@ -136,7 +137,9 @@ class Tests_Comment extends WP_UnitTestCase {
|
||||
|
||||
$id = wp_new_comment( $data );
|
||||
|
||||
$this->assertFalse( $id );
|
||||
$comment = get_comment( $id );
|
||||
|
||||
$this->assertEquals( strlen( $comment->comment_content ), 65535 );
|
||||
|
||||
// Cleanup.
|
||||
if ( isset( $remote_addr ) ) {
|
||||
|
||||
Reference in New Issue
Block a user