Commit 997442b
pento
Database: Split the logic of
The logic for determining the appropriate character set and collation to use is becoming more complex, particularly with the recent additions of [37522] and [37523]. As `init_charset()` has side effects, and makes use of constants instead of parameters, it's not possible to unit test this logic.
This commit splits the logic part of `init_charset()` out into a new method, `wpdb::determine_charset()`, along with appropriate unit tests.
See #32105, #37522.
Fixes #36917.
Built from https://develop.svn.wordpress.org/trunk@37601
git-svn-id: http://core.svn.wordpress.org/trunk@37569 1a063a9b-81f0-0310-95a4-ce76da25c4cdwpdb::init_charset() into a separate method.1 parent 395b90c commit 997442b
2 files changed
+36
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
735 | 735 | | |
736 | 736 | | |
737 | 737 | | |
738 | | - | |
| 738 | + | |
739 | 739 | | |
740 | | - | |
| 740 | + | |
741 | 741 | | |
742 | | - | |
| 742 | + | |
743 | 743 | | |
744 | 744 | | |
745 | | - | |
| 745 | + | |
746 | 746 | | |
747 | 747 | | |
748 | 748 | | |
749 | | - | |
| 749 | + | |
750 | 750 | | |
751 | 751 | | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
752 | 771 | | |
753 | | - | |
| 772 | + | |
754 | 773 | | |
755 | 774 | | |
756 | | - | |
757 | | - | |
| 775 | + | |
| 776 | + | |
758 | 777 | | |
759 | 778 | | |
760 | | - | |
| 779 | + | |
761 | 780 | | |
762 | | - | |
763 | | - | |
| 781 | + | |
| 782 | + | |
764 | 783 | | |
765 | | - | |
| 784 | + | |
766 | 785 | | |
767 | 786 | | |
768 | 787 | | |
769 | 788 | | |
770 | | - | |
771 | | - | |
| 789 | + | |
| 790 | + | |
772 | 791 | | |
| 792 | + | |
| 793 | + | |
773 | 794 | | |
774 | 795 | | |
775 | 796 | | |
| |||
0 commit comments