Changeset 52010 for trunk/tests/phpunit/tests/customize/manager.php
- Timestamp:
- 11/04/2021 03:22:47 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/manager.php
r51568 r52010 54 54 * Set up test. 55 55 */ 56 function set_up() {56 public function set_up() { 57 57 parent::set_up(); 58 58 require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; … … 71 71 * Tear down test. 72 72 */ 73 function tear_down() {73 public function tear_down() { 74 74 $this->manager = null; 75 75 unset( $GLOBALS['wp_customize'] ); … … 84 84 * @return string Theme slug (stylesheet). 85 85 */ 86 function get_inactive_core_theme() {86 private function get_inactive_core_theme() { 87 87 $stylesheet = get_stylesheet(); 88 88 foreach ( wp_get_themes() as $theme ) { … … 99 99 * @return WP_Customize_Manager 100 100 */ 101 function instantiate() {101 private function instantiate() { 102 102 $GLOBALS['wp_customize'] = new WP_Customize_Manager(); 103 103 return $GLOBALS['wp_customize']; … … 109 109 * @covers WP_Customize_Manager::__construct 110 110 */ 111 function test_constructor() {111 public function test_constructor() { 112 112 $uuid = wp_generate_uuid4(); 113 113 $theme = 'twentyfifteen'; … … 228 228 * @covers WP_Customize_Manager::setup_theme 229 229 */ 230 function test_setup_theme_in_customize_admin() {230 public function test_setup_theme_in_customize_admin() { 231 231 global $pagenow, $wp_customize; 232 232 $pagenow = 'customize.php'; … … 274 274 * @ticket 41039 275 275 */ 276 function test_fresh_site_flag_clearing() {276 public function test_fresh_site_flag_clearing() { 277 277 global $wp_customize, $wpdb; 278 278 … … 297 297 * @covers WP_Customize_Manager::setup_theme 298 298 */ 299 function test_setup_theme_in_frontend() {299 public function test_setup_theme_in_frontend() { 300 300 global $wp_customize, $pagenow, $show_admin_bar; 301 301 $pagenow = 'front'; … … 332 332 * @covers WP_Customize_Manager::settings_previewed 333 333 */ 334 function test_settings_previewed() {334 public function test_settings_previewed() { 335 335 $wp_customize = new WP_Customize_Manager( array( 'settings_previewed' => false ) ); 336 336 $this->assertFalse( $wp_customize->settings_previewed() ); … … 385 385 * @covers WP_Customize_Manager::changeset_uuid 386 386 */ 387 function test_changeset_uuid() {387 public function test_changeset_uuid() { 388 388 $uuid = wp_generate_uuid4(); 389 389 $wp_customize = new WP_Customize_Manager( array( 'changeset_uuid' => $uuid ) ); … … 399 399 * @covers WP_Customize_Manager::wp_loaded 400 400 */ 401 function test_wp_loaded() {401 public function test_wp_loaded() { 402 402 wp_set_current_user( self::$admin_user_id ); 403 403 $wp_customize = new WP_Customize_Manager(); … … 417 417 * @covers WP_Customize_Manager::find_changeset_post_id 418 418 */ 419 function test_find_changeset_post_id() {419 public function test_find_changeset_post_id() { 420 420 $uuid = wp_generate_uuid4(); 421 421 $post_id = $this->factory()->post->create( … … 442 442 * @covers WP_Customize_Manager::changeset_post_id 443 443 */ 444 function test_changeset_post_id() {444 public function test_changeset_post_id() { 445 445 $uuid = wp_generate_uuid4(); 446 446 $wp_customize = new WP_Customize_Manager( array( 'changeset_uuid' => $uuid ) ); … … 466 466 * @covers WP_Customize_Manager::changeset_data 467 467 */ 468 function test_changeset_data() {468 public function test_changeset_data() { 469 469 wp_set_current_user( self::$admin_user_id ); 470 470 $uuid = wp_generate_uuid4(); … … 544 544 * @requires function imagejpeg 545 545 */ 546 function test_import_theme_starter_content() {546 public function test_import_theme_starter_content() { 547 547 wp_set_current_user( self::$admin_user_id ); 548 548 register_nav_menu( 'top', 'Top' ); … … 812 812 * @covers WP_Customize_Manager::import_theme_starter_content 813 813 */ 814 function test_import_theme_starter_content_with_nested_arrays() {814 public function test_import_theme_starter_content_with_nested_arrays() { 815 815 wp_set_current_user( self::$admin_user_id ); 816 816 … … 886 886 * @covers WP_Customize_Manager::customize_preview_init 887 887 */ 888 function test_customize_preview_init() {888 public function test_customize_preview_init() { 889 889 890 890 // Test authorized admin user. … … 931 931 * @covers WP_Customize_Manager::filter_iframe_security_headers 932 932 */ 933 function test_filter_iframe_security_headers() {933 public function test_filter_iframe_security_headers() { 934 934 $wp_customize = new WP_Customize_Manager(); 935 935 $headers = $wp_customize->filter_iframe_security_headers( array() ); … … 946 946 * @covers WP_Customize_Manager::add_state_query_params 947 947 */ 948 function test_add_state_query_params() {948 public function test_add_state_query_params() { 949 949 $preview_theme = $this->get_inactive_core_theme(); 950 950 … … 1005 1005 * @covers WP_Customize_Manager::save_changeset_post 1006 1006 */ 1007 function test_save_changeset_post_without_theme_activation() {1007 public function test_save_changeset_post_without_theme_activation() { 1008 1008 global $wp_customize; 1009 1009 wp_set_current_user( self::$admin_user_id ); … … 1422 1422 * @return array Data. 1423 1423 */ 1424 function filter_customize_changeset_save_data( $data, $context ) {1424 public function filter_customize_changeset_save_data( $data, $context ) { 1425 1425 $this->customize_changeset_save_data_call_count += 1; 1426 1426 $this->assertIsArray( $data ); … … 1441 1441 * @return WP_Error Error. 1442 1442 */ 1443 function return_illegal_error() {1443 public function return_illegal_error() { 1444 1444 return new WP_Error( 'illegal' ); 1445 1445 } … … 1452 1452 * @covers WP_Customize_Manager::update_stashed_theme_mod_settings 1453 1453 */ 1454 function test_save_changeset_post_with_theme_activation() {1454 public function test_save_changeset_post_with_theme_activation() { 1455 1455 global $wp_customize; 1456 1456 wp_set_current_user( self::$admin_user_id ); … … 1490 1490 * @covers WP_Customize_Manager::save_changeset_post 1491 1491 */ 1492 function test_save_changeset_post_with_varying_users() {1492 public function test_save_changeset_post_with_varying_users() { 1493 1493 global $wp_customize; 1494 1494 … … 1665 1665 * @covers WP_Customize_Manager::save_changeset_post 1666 1666 */ 1667 function test_save_changeset_post_dumping_auto_draft_date() {1667 public function test_save_changeset_post_dumping_auto_draft_date() { 1668 1668 global $wp_customize; 1669 1669 wp_set_current_user( self::$admin_user_id ); … … 1705 1705 * @covers WP_Customize_Manager::save_changeset_post 1706 1706 */ 1707 function test_save_changeset_post_with_unchanged_values() {1707 public function test_save_changeset_post_with_unchanged_values() { 1708 1708 global $wp_customize; 1709 1709 … … 1905 1905 * @covers WP_Customize_Manager::save_changeset_post 1906 1906 */ 1907 function test_remove_setting_from_changeset_post() {1907 public function test_remove_setting_from_changeset_post() { 1908 1908 $uuid = wp_generate_uuid4(); 1909 1909 … … 1941 1941 * @covers WP_Customize_Manager::save_changeset_post 1942 1942 */ 1943 function test_save_changeset_post_with_varying_unfiltered_html_cap() {1943 public function test_save_changeset_post_with_varying_unfiltered_html_cap() { 1944 1944 global $wp_customize; 1945 1945 grant_super_admin( self::$admin_user_id ); … … 2013 2013 * @see WP_Customize_Widgets::customize_register() 2014 2014 */ 2015 function test_wp_customize_publish_changeset() {2015 public function test_wp_customize_publish_changeset() { 2016 2016 global $wp_customize; 2017 2017 $wp_customize = null; … … 2059 2059 * @covers WP_Customize_Manager::save_changeset_post 2060 2060 */ 2061 function test_publish_changeset_with_future_status_when_future_date() {2061 public function test_publish_changeset_with_future_status_when_future_date() { 2062 2062 $wp_customize = $this->create_test_manager( wp_generate_uuid4() ); 2063 2063 … … 2080 2080 * @covers WP_Customize_Manager::get_changeset_post_data 2081 2081 */ 2082 function test_save_changeset_post_for_bad_changeset() {2082 public function test_save_changeset_post_for_bad_changeset() { 2083 2083 $uuid = wp_generate_uuid4(); 2084 2084 $post_id = wp_insert_post( … … 2151 2151 * @param WP_Customize_Manager $wp_customize Manager. 2152 2152 */ 2153 function register_scratchpad_setting( WP_Customize_Manager $wp_customize ) {2153 public function register_scratchpad_setting( WP_Customize_Manager $wp_customize ) { 2154 2154 $wp_customize->add_setting( 2155 2155 'scratchpad', … … 2168 2168 * @return string Value. 2169 2169 */ 2170 function filter_sanitize_scratchpad( $value ) {2170 public function filter_sanitize_scratchpad( $value ) { 2171 2171 return apply_filters( 'content_save_pre', $value ); 2172 2172 } … … 2186 2186 * @return mixed Value. 2187 2187 */ 2188 function filter_customize_setting_to_log_current_user( $value, $setting ) {2188 public function filter_customize_setting_to_log_current_user( $value, $setting ) { 2189 2189 $this->filtered_setting_current_user_ids[ $setting->id ] = get_current_user_id(); 2190 2190 return $value; … … 2197 2197 * @covers WP_Customize_Manager::is_cross_domain 2198 2198 */ 2199 function test_is_cross_domain() {2199 public function test_is_cross_domain() { 2200 2200 $wp_customize = new WP_Customize_Manager(); 2201 2201 … … 2215 2215 * @covers WP_Customize_Manager::get_allowed_urls 2216 2216 */ 2217 function test_get_allowed_urls() {2217 public function test_get_allowed_urls() { 2218 2218 $wp_customize = new WP_Customize_Manager(); 2219 2219 $this->assertFalse( is_ssl() ); … … 2233 2233 * @return array URLs. 2234 2234 */ 2235 function filter_customize_allowed_urls( $urls ) {2235 public function filter_customize_allowed_urls( $urls ) { 2236 2236 $urls[] = 'http://headless.example.com/'; 2237 2237 return $urls; … … 2243 2243 * @group ajax 2244 2244 */ 2245 function test_doing_ajax() {2245 public function test_doing_ajax() { 2246 2246 add_filter( 'wp_doing_ajax', '__return_true' ); 2247 2247 … … 2257 2257 * Test ! WP_Customize_Manager::doing_ajax(). 2258 2258 */ 2259 function test_not_doing_ajax() {2259 public function test_not_doing_ajax() { 2260 2260 add_filter( 'wp_doing_ajax', '__return_false' ); 2261 2261 … … 2269 2269 * @ticket 30988 2270 2270 */ 2271 function test_unsanitized_post_values_from_input() {2271 public function test_unsanitized_post_values_from_input() { 2272 2272 wp_set_current_user( self::$admin_user_id ); 2273 2273 $manager = $this->manager; … … 2298 2298 * @covers WP_Customize_Manager::unsanitized_post_values 2299 2299 */ 2300 function test_unsanitized_post_values_with_changeset_and_stashed_theme_mods() {2300 public function test_unsanitized_post_values_with_changeset_and_stashed_theme_mods() { 2301 2301 wp_set_current_user( self::$admin_user_id ); 2302 2302 … … 2422 2422 * @ticket 30988 2423 2423 */ 2424 function test_post_value() {2424 public function test_post_value() { 2425 2425 wp_set_current_user( self::$admin_user_id ); 2426 2426 $posted_settings = array( … … 2446 2446 * @ticket 34893 2447 2447 */ 2448 function test_invalid_post_value() {2448 public function test_invalid_post_value() { 2449 2449 wp_set_current_user( self::$admin_user_id ); 2450 2450 $default_value = 'foo_default'; … … 2484 2484 * @return string|WP_Error 2485 2485 */ 2486 function filter_customize_sanitize_foo( $value ) {2486 public function filter_customize_sanitize_foo( $value ) { 2487 2487 if ( 'return_null_in_sanitize' === $value ) { 2488 2488 $value = null; … … 2503 2503 * @return WP_Error 2504 2504 */ 2505 function filter_customize_validate_foo( $validity, $value ) {2505 public function filter_customize_validate_foo( $validity, $value ) { 2506 2506 if ( false !== stripos( $value, '<script' ) ) { 2507 2507 $validity->add( 'invalid_value_in_validate', __( 'Invalid value.' ), array( 'source' => 'filter_customize_validate_foo' ) ); … … 2515 2515 * @ticket 37247 2516 2516 */ 2517 function test_post_value_validation_sanitization_order() {2517 public function test_post_value_validation_sanitization_order() { 2518 2518 wp_set_current_user( self::$admin_user_id ); 2519 2519 $default_value = '0'; … … 2540 2540 * @return string|WP_Error 2541 2541 */ 2542 function filter_customize_sanitize_numeric( $value ) {2542 public function filter_customize_sanitize_numeric( $value ) { 2543 2543 return absint( $value ); 2544 2544 } … … 2551 2551 * @return WP_Error 2552 2552 */ 2553 function filter_customize_validate_numeric( $validity, $value ) {2553 public function filter_customize_validate_numeric( $validity, $value ) { 2554 2554 if ( ! is_string( $value ) || ! is_numeric( $value ) ) { 2555 2555 $validity->add( 'invalid_value_in_validate', __( 'Invalid value.' ), array( 'source' => 'filter_customize_validate_numeric' ) ); … … 2563 2563 * @see WP_Customize_Manager::validate_setting_values() 2564 2564 */ 2565 function test_validate_setting_values() {2565 public function test_validate_setting_values() { 2566 2566 wp_set_current_user( self::$admin_user_id ); 2567 2567 $setting = $this->manager->add_setting( … … 2612 2612 * @covers WP_Customize_Manager::validate_setting_values 2613 2613 */ 2614 function test_late_validate_setting_values() {2614 public function test_late_validate_setting_values() { 2615 2615 $setting = new Test_Setting_Without_Applying_Validate_Filter( $this->manager, 'required' ); 2616 2616 $this->manager->add_setting( $setting ); … … 2638 2638 * @covers WP_Customize_Manager::validate_setting_values 2639 2639 */ 2640 function test_validate_setting_values_args() {2640 public function test_validate_setting_values_args() { 2641 2641 wp_set_current_user( self::$admin_user_id ); 2642 2642 $this->manager->register_controls(); … … 2676 2676 * @return WP_Error Validity. 2677 2677 */ 2678 function late_validate_length( $validity, $value, $setting ) {2678 public function late_validate_length( $validity, $value, $setting ) { 2679 2679 $this->assertInstanceOf( 'WP_Customize_Setting', $setting ); 2680 2680 if ( strlen( $value ) < 10 ) { … … 2689 2689 * @ticket 37247 2690 2690 */ 2691 function test_validate_setting_values_validation_sanitization_order() {2691 public function test_validate_setting_values_validation_sanitization_order() { 2692 2692 wp_set_current_user( self::$admin_user_id ); 2693 2693 $setting = $this->manager->add_setting( … … 2710 2710 * @see WP_Customize_Manager::prepare_setting_validity_for_js() 2711 2711 */ 2712 function test_prepare_setting_validity_for_js() {2712 public function test_prepare_setting_validity_for_js() { 2713 2713 $this->assertTrue( $this->manager->prepare_setting_validity_for_js( true ) ); 2714 2714 $error = new WP_Error(); … … 2734 2734 * @see WP_Customize_Manager::set_post_value() 2735 2735 */ 2736 function test_set_post_value() {2736 public function test_set_post_value() { 2737 2737 wp_set_current_user( self::$admin_user_id ); 2738 2738 $this->manager->add_setting( … … 2769 2769 * @return int Value. 2770 2770 */ 2771 function sanitize_foo_for_test_set_post_value( $value ) {2771 public function sanitize_foo_for_test_set_post_value( $value ) { 2772 2772 return (int) $value; 2773 2773 } … … 2788 2788 * @param mixed ...$args Optional arguments passed to the action. 2789 2789 */ 2790 function capture_customize_post_value_set_actions( ...$args ) {2790 public function capture_customize_post_value_set_actions( ...$args ) { 2791 2791 $action = current_action(); 2792 2792 $this->captured_customize_post_value_set_actions[] = compact( 'action', 'args' ); … … 2798 2798 * @ticket 30936 2799 2799 */ 2800 function test_add_dynamic_settings() {2800 public function test_add_dynamic_settings() { 2801 2801 $manager = $this->manager; 2802 2802 $setting_ids = array( 'foo', 'bar' ); … … 2819 2819 * @covers WP_Customize_Manager::has_published_pages 2820 2820 */ 2821 function test_has_published_pages() {2821 public function test_has_published_pages() { 2822 2822 foreach ( get_pages() as $page ) { 2823 2823 wp_delete_post( $page->ID, true ); … … 2848 2848 * @covers WP_Customize_Manager::has_published_pages 2849 2849 */ 2850 function test_has_published_pages_when_nav_menus_created_posts() {2850 public function test_has_published_pages_when_nav_menus_created_posts() { 2851 2851 foreach ( get_pages() as $page ) { 2852 2852 wp_delete_post( $page->ID, true ); … … 2877 2877 * @ticket 30936 2878 2878 */ 2879 function test_register_dynamic_settings() {2879 public function test_register_dynamic_settings() { 2880 2880 wp_set_current_user( self::$admin_user_id ); 2881 2881 $posted_settings = array( … … 2899 2899 * In lieu of closures, callback for customize_register action added in test_register_dynamic_settings(). 2900 2900 */ 2901 function action_customize_register_for_dynamic_settings() {2901 public function action_customize_register_for_dynamic_settings() { 2902 2902 add_filter( 'customize_dynamic_setting_args', array( $this, 'filter_customize_dynamic_setting_args_for_test_dynamic_settings' ), 10, 2 ); 2903 2903 add_filter( 'customize_dynamic_setting_class', array( $this, 'filter_customize_dynamic_setting_class_for_test_dynamic_settings' ), 10, 3 ); … … 2911 2911 * @return array 2912 2912 */ 2913 function filter_customize_dynamic_setting_args_for_test_dynamic_settings( $setting_args, $setting_id ) {2913 public function filter_customize_dynamic_setting_args_for_test_dynamic_settings( $setting_args, $setting_id ) { 2914 2914 $this->assertIsString( $setting_id ); 2915 2915 if ( in_array( $setting_id, array( 'foo', 'bar' ), true ) ) { … … 2927 2927 * @return string 2928 2928 */ 2929 function filter_customize_dynamic_setting_class_for_test_dynamic_settings( $setting_class, $setting_id, $setting_args ) {2929 public function filter_customize_dynamic_setting_class_for_test_dynamic_settings( $setting_class, $setting_id, $setting_args ) { 2930 2930 $this->assertSame( 'WP_Customize_Setting', $setting_class ); 2931 2931 $this->assertIsString( $setting_id ); … … 2939 2939 * @see WP_Customize_Manager::get_document_title_template() 2940 2940 */ 2941 function test_get_document_title_template() {2941 public function test_get_document_title_template() { 2942 2942 $tpl = $this->manager->get_document_title_template(); 2943 2943 $this->assertStringContainsString( '%s', $tpl ); … … 2950 2950 * @see WP_Customize_Manager::set_preview_url() 2951 2951 */ 2952 function test_preview_url() {2952 public function test_preview_url() { 2953 2953 $this->assertSame( home_url( '/' ), $this->manager->get_preview_url() ); 2954 2954 $preview_url = home_url( '/foo/bar/baz/' ); … … 2965 2965 * @see WP_Customize_Manager::set_return_url() 2966 2966 */ 2967 function test_return_url() {2967 public function test_return_url() { 2968 2968 wp_set_current_user( self::factory()->user->create( array( 'role' => 'author' ) ) ); 2969 2969 $this->assertSame( home_url( '/' ), $this->manager->get_return_url() ); … … 3000 3000 * @ticket 46686 3001 3001 */ 3002 function test_return_url_with_deactivated_theme() {3002 public function test_return_url_with_deactivated_theme() { 3003 3003 $this->manager->set_return_url( admin_url( 'themes.php?page=mytheme_documentation' ) ); 3004 3004 $this->assertSame( admin_url( 'themes.php' ), $this->manager->get_return_url() ); … … 3011 3011 * @see WP_Customize_Manager::set_autofocus() 3012 3012 */ 3013 function test_autofocus() {3013 public function test_autofocus() { 3014 3014 $this->assertEmpty( $this->manager->get_autofocus() ); 3015 3015 … … 3039 3039 * @see WP_Customize_Manager::get_nonces() 3040 3040 */ 3041 function test_nonces() {3041 public function test_nonces() { 3042 3042 $nonces = $this->manager->get_nonces(); 3043 3043 $this->assertIsArray( $nonces ); … … 3058 3058 * @return array Nonces. 3059 3059 */ 3060 function filter_customize_refresh_nonces( $nonces, $manager ) {3060 public function filter_customize_refresh_nonces( $nonces, $manager ) { 3061 3061 $this->assertInstanceOf( 'WP_Customize_Manager', $manager ); 3062 3062 $nonces['foo'] = wp_create_nonce( 'foo' ); … … 3069 3069 * @see WP_Customize_Manager::customize_pane_settings() 3070 3070 */ 3071 function test_customize_pane_settings() {3071 public function test_customize_pane_settings() { 3072 3072 wp_set_current_user( self::$admin_user_id ); 3073 3073 $this->manager->register_controls(); … … 3120 3120 * @covers WP_Customize_Manager::remove_frameless_preview_messenger_channel 3121 3121 */ 3122 function test_remove_frameless_preview_messenger_channel() {3122 public function test_remove_frameless_preview_messenger_channel() { 3123 3123 wp_set_current_user( self::$admin_user_id ); 3124 3124 $manager = new WP_Customize_Manager( array( 'messenger_channel' => null ) ); … … 3140 3140 * @see WP_Customize_Manager::customize_preview_settings() 3141 3141 */ 3142 function test_customize_preview_settings() {3142 public function test_customize_preview_settings() { 3143 3143 wp_set_current_user( self::$admin_user_id ); 3144 3144 $this->manager->register_controls(); … … 3172 3172 * @ticket 33552 3173 3173 */ 3174 function test_customize_loaded_components_filter() {3174 public function test_customize_loaded_components_filter() { 3175 3175 $manager = new WP_Customize_Manager(); 3176 3176 $this->assertInstanceOf( 'WP_Customize_Widgets', $manager->widgets ); … … 3204 3204 * @return array Components. 3205 3205 */ 3206 function return_array_containing_widgets( $components, $customize_manager ) {3206 public function return_array_containing_widgets( $components, $customize_manager ) { 3207 3207 $this->assertIsArray( $components ); 3208 3208 $this->assertContains( 'widgets', $components ); … … 3221 3221 * @return array Components. 3222 3222 */ 3223 function return_array_containing_nav_menus( $components, $customize_manager ) {3223 public function return_array_containing_nav_menus( $components, $customize_manager ) { 3224 3224 $this->assertIsArray( $components ); 3225 3225 $this->assertContains( 'widgets', $components ); … … 3234 3234 * @ticket 34594 3235 3235 */ 3236 function test_prepare_controls_stable_sorting() {3236 public function test_prepare_controls_stable_sorting() { 3237 3237 $manager = new WP_Customize_Manager(); 3238 3238 $manager->register_controls(); … … 3274 3274 * @ticket 34596 3275 3275 */ 3276 function test_add_section_return_instance() {3276 public function test_add_section_return_instance() { 3277 3277 $manager = new WP_Customize_Manager(); 3278 3278 wp_set_current_user( self::$admin_user_id ); … … 3308 3308 * @ticket 34596 3309 3309 */ 3310 function test_add_setting_return_instance() {3310 public function test_add_setting_return_instance() { 3311 3311 $manager = new WP_Customize_Manager(); 3312 3312 wp_set_current_user( self::$admin_user_id ); … … 3329 3329 * @ticket 34597 3330 3330 */ 3331 function test_add_setting_honoring_dynamic() {3331 public function test_add_setting_honoring_dynamic() { 3332 3332 $manager = new WP_Customize_Manager(); 3333 3333 … … 3354 3354 * @return string Setting class. 3355 3355 */ 3356 function return_dynamic_customize_setting_class( $class, $id, $args ) {3356 public function return_dynamic_customize_setting_class( $class, $id, $args ) { 3357 3357 unset( $args ); 3358 3358 if ( 0 === strpos( $id, 'dynamic' ) ) { … … 3369 3369 * @return string Setting args. 3370 3370 */ 3371 function return_dynamic_customize_setting_args( $args, $id ) {3371 public function return_dynamic_customize_setting_args( $args, $id ) { 3372 3372 if ( 0 === strpos( $id, 'dynamic' ) ) { 3373 3373 $args['custom'] = 'foo'; … … 3379 3379 * @ticket 34596 3380 3380 */ 3381 function test_add_panel_return_instance() {3381 public function test_add_panel_return_instance() { 3382 3382 $manager = new WP_Customize_Manager(); 3383 3383 wp_set_current_user( self::$admin_user_id ); … … 3412 3412 * @ticket 34596 3413 3413 */ 3414 function test_add_control_return_instance() {3414 public function test_add_control_return_instance() { 3415 3415 $manager = new WP_Customize_Manager(); 3416 3416 $section_id = 'foo-section'; … … 3460 3460 * @ticket 31195 3461 3461 */ 3462 function test_get_previewable_devices() {3462 public function test_get_previewable_devices() { 3463 3463 3464 3464 // Setup the instance. … … 3497 3497 * @return array 3498 3498 */ 3499 function filtered_device_list() {3499 private function filtered_device_list() { 3500 3500 return array( 3501 3501 'custom-device' => array( … … 3513 3513 * @return array 3514 3514 */ 3515 function filter_customize_previewable_devices( $devices ) {3515 public function filter_customize_previewable_devices( $devices ) { 3516 3516 return $this->filtered_device_list(); 3517 3517 } … … 3520 3520 * @ticket 37128 3521 3521 */ 3522 function test_prepare_controls_wp_list_sort_controls() {3522 public function test_prepare_controls_wp_list_sort_controls() { 3523 3523 wp_set_current_user( self::$admin_user_id ); 3524 3524 … … 3553 3553 * @ticket 37128 3554 3554 */ 3555 function test_prepare_controls_wp_list_sort_sections() {3555 public function test_prepare_controls_wp_list_sort_sections() { 3556 3556 wp_set_current_user( self::$admin_user_id ); 3557 3557 … … 3582 3582 * @ticket 37128 3583 3583 */ 3584 function test_prepare_controls_wp_list_sort_panels() {3584 public function test_prepare_controls_wp_list_sort_panels() { 3585 3585 wp_set_current_user( self::$admin_user_id ); 3586 3586 … … 3613 3613 * @ticket 39125 3614 3614 */ 3615 function test_sanitize_external_header_video_trim() {3615 public function test_sanitize_external_header_video_trim() { 3616 3616 $this->manager->register_controls(); 3617 3617 $setting = $this->manager->get_setting( 'external_header_video' );
Note: See TracChangeset
for help on using the changeset viewer.