|
@@ 656-676 (lines=21) @@
|
| 653 |
|
* @dataProvider data_test_get_column_charset |
| 654 |
|
* @ticket 21212 |
| 655 |
|
*/ |
| 656 |
|
function test_get_column_charset_non_mysql( $drop, $create, $table, $columns ) |
| 657 |
|
{ |
| 658 |
|
self::$_wpdb->query($drop); |
| 659 |
|
|
| 660 |
|
if (! self::$_wpdb->has_cap('utf8mb4') && preg_match('/utf8mb[34]/i', $create) ) { |
| 661 |
|
$this->markTestSkipped("This version of MySQL doesn't support utf8mb4."); |
| 662 |
|
return; |
| 663 |
|
} |
| 664 |
|
|
| 665 |
|
self::$_wpdb->is_mysql = false; |
| 666 |
|
|
| 667 |
|
self::$_wpdb->query($create); |
| 668 |
|
|
| 669 |
|
$columns = array_keys($columns); |
| 670 |
|
foreach ( $columns as $column => $charset ) { |
| 671 |
|
$this->assertEquals(false, self::$_wpdb->get_col_charset($table, $column)); |
| 672 |
|
} |
| 673 |
|
|
| 674 |
|
self::$_wpdb->query($drop); |
| 675 |
|
|
| 676 |
|
self::$_wpdb->is_mysql = true; |
| 677 |
|
} |
| 678 |
|
|
| 679 |
|
/** |
|
@@ 683-703 (lines=21) @@
|
| 680 |
|
* @dataProvider data_test_get_column_charset |
| 681 |
|
* @ticket 33501 |
| 682 |
|
*/ |
| 683 |
|
function test_get_column_charset_is_mysql_undefined( $drop, $create, $table, $columns ) |
| 684 |
|
{ |
| 685 |
|
self::$_wpdb->query($drop); |
| 686 |
|
|
| 687 |
|
if (! self::$_wpdb->has_cap('utf8mb4') && preg_match('/utf8mb[34]/i', $create) ) { |
| 688 |
|
$this->markTestSkipped("This version of MySQL doesn't support utf8mb4."); |
| 689 |
|
return; |
| 690 |
|
} |
| 691 |
|
|
| 692 |
|
unset(self::$_wpdb->is_mysql); |
| 693 |
|
|
| 694 |
|
self::$_wpdb->query($create); |
| 695 |
|
|
| 696 |
|
$columns = array_keys($columns); |
| 697 |
|
foreach ( $columns as $column => $charset ) { |
| 698 |
|
$this->assertEquals(false, self::$_wpdb->get_col_charset($table, $column)); |
| 699 |
|
} |
| 700 |
|
|
| 701 |
|
self::$_wpdb->query($drop); |
| 702 |
|
|
| 703 |
|
self::$_wpdb->is_mysql = true; |
| 704 |
|
} |
| 705 |
|
|
| 706 |
|
/** |