Changeset 51705 for trunk/tests/phpunit/tests/widgets.php
- Timestamp:
- 08/31/2021 07:57:20 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/widgets.php
r51568 r51705 844 844 * Tests for when 'sidebars_widgets' theme mod is populated. 845 845 * 846 * @covers :: retrieve_widgets847 */ 848 function test_ retrieve_widgets_with_theme_mod() {846 * @covers ::sync_registered_widgets 847 */ 848 function test_sync_registered_widgets_with_theme_mod() { 849 849 global $sidebars_widgets, $_wp_sidebars_widgets; 850 850 … … 874 874 ); 875 875 876 $result = retrieve_widgets( true );876 $result = sync_registered_widgets( true ); 877 877 878 878 $this->assertIsArray( $result ); … … 907 907 * Tests for when sidebars widgets matches registered sidebars. 908 908 * 909 * @covers :: retrieve_widgets910 */ 911 function test_ retrieve_widgets_with_sidebars_widgets_matching_registered_sidebars() {909 * @covers ::sync_registered_widgets 910 */ 911 function test_sync_registered_widgets_with_sidebars_widgets_matching_registered_sidebars() { 912 912 global $sidebars_widgets; 913 913 … … 922 922 ); 923 923 924 $result = retrieve_widgets( true );924 $result = sync_registered_widgets( true ); 925 925 926 926 // $sidebars_widgets matches registered sidebars. … … 945 945 * Tests for when sidebars widgets doesn't match registered sidebars. 946 946 * 947 * @covers :: retrieve_widgets948 */ 949 function test_ retrieve_widgets_with_sidebars_widgets_not_matching_registered_sidebars() {947 * @covers ::sync_registered_widgets 948 */ 949 function test_sync_registered_widgets_with_sidebars_widgets_not_matching_registered_sidebars() { 950 950 global $sidebars_widgets, $_wp_sidebars_widgets; 951 951 … … 961 961 962 962 // Theme changed. 963 $result = retrieve_widgets( true );963 $result = sync_registered_widgets( true ); 964 964 965 965 $_wp_sidebars_widgets = array(); … … 1003 1003 1004 1004 // Theme did not change. 1005 $result = retrieve_widgets();1005 $result = sync_registered_widgets(); 1006 1006 1007 1007 $_wp_sidebars_widgets = array(); … … 1037 1037 * Tests for Customizer mode. 1038 1038 * 1039 * @covers :: retrieve_widgets1040 */ 1041 function test_ retrieve_widgets_for_customizer() {1039 * @covers ::sync_registered_widgets 1040 */ 1041 function test_sync_registered_widgets_for_customizer() { 1042 1042 global $sidebars_widgets, $_wp_sidebars_widgets; 1043 1043 … … 1054 1054 set_theme_mod( 'sidebars_widgets', $old_sidebars_widgets ); 1055 1055 1056 $result = retrieve_widgets( 'customize' );1056 $result = sync_registered_widgets( 'customize' ); 1057 1057 1058 1058 $_wp_sidebars_widgets = array(); … … 1083 1083 } 1084 1084 1085 function test_ retrieve_widgets_with_single_widget() {1085 function test_sync_registered_widgets_with_single_widget() { 1086 1086 global $sidebars_widgets; 1087 1087 … … 1100 1100 1101 1101 // Theme changed. 1102 $result = retrieve_widgets( true );1102 $result = sync_registered_widgets( true ); 1103 1103 1104 1104 $this->assertContains( 'single', $result['wp_inactive_widgets'] ); … … 1108 1108 * Tests for orphaned widgets being moved into inactive widgets. 1109 1109 * 1110 * @covers :: retrieve_widgets1111 */ 1112 function test_ retrieve_widgets_move_orphaned_widgets_to_inactive() {1110 * @covers ::sync_registered_widgets 1111 */ 1112 function test_sync_registered_widgets_move_orphaned_widgets_to_inactive() { 1113 1113 global $sidebars_widgets; 1114 1114 … … 1123 1123 ); 1124 1124 1125 retrieve_widgets();1125 sync_registered_widgets(); 1126 1126 1127 1127 $this->assertIsArray( $sidebars_widgets );
Note: See TracChangeset
for help on using the changeset viewer.