Ticket #41716: 41716.diff
File 41716.diff, 1.0 KB (added by , 7 years ago) |
---|
-
tests/phpunit/tests/dbdelta.php
361 361 $this->markTestSkipped( 'This test requires utf8mb4 support in MySQL.' ); 362 362 } 363 363 364 $table_name = 'test_truncated_index'; 364 // This table needs to be actually created 365 remove_filter( 'query', array( $this, '_create_temporary_tables' ) ); 366 remove_filter( 'query', array( $this, '_drop_temporary_tables' ) ); 367 368 $table_name = "{$wpdb->prefix}test_truncated_index"; 369 370 $create = " 371 CREATE TABLE $table_name ( 372 a varchar(255) COLLATE utf8mb4_unicode_ci, 373 KEY a_key (a) 374 ) ENGINE=InnoDB ROW_FORMAT=COMPACT"; 365 375 366 $create = "CREATE TABLE $table_name (\n a varchar(255) COLLATE utf8mb4_unicode_ci,\n KEY a (a)\n)";367 376 $wpdb->query( $create ); 368 377 369 378 $actual = dbDelta( $create, false ); 370 379 380 $wpdb->query( "DROP TABLE IF EXISTS $table_name;" ); 381 371 382 $this->assertSame( array(), $actual ); 372 383 } 373 384