Changeset 52010 for trunk/tests/phpunit/tests/customize/panel.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/panel.php
r51568 r52010 13 13 protected $manager; 14 14 15 function set_up() {15 public function set_up() { 16 16 parent::set_up(); 17 17 require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; … … 21 21 } 22 22 23 function tear_down() {23 public function tear_down() { 24 24 $this->manager = null; 25 25 unset( $GLOBALS['wp_customize'] ); … … 30 30 * @see WP_Customize_Panel::__construct() 31 31 */ 32 function test_construct_default_args() {32 public function test_construct_default_args() { 33 33 $panel = new WP_Customize_Panel( $this->manager, 'foo' ); 34 34 $this->assertIsInt( $panel->instance_number ); … … 48 48 * @see WP_Customize_Panel::__construct() 49 49 */ 50 function test_construct_custom_args() {50 public function test_construct_custom_args() { 51 51 $args = array( 52 52 'priority' => 200, … … 68 68 * @see WP_Customize_Panel::__construct() 69 69 */ 70 function test_construct_custom_type() {70 public function test_construct_custom_type() { 71 71 $panel = new Custom_Panel_Test( $this->manager, 'foo' ); 72 72 $this->assertSame( 'titleless', $panel->type ); … … 77 77 * @see WP_Customize_Panel::active_callback() 78 78 */ 79 function test_active() {79 public function test_active() { 80 80 $panel = new WP_Customize_Panel( $this->manager, 'foo' ); 81 81 $this->assertTrue( $panel->active() ); … … 98 98 * @return bool 99 99 */ 100 function filter_active_test( $active, $panel ) {100 public function filter_active_test( $active, $panel ) { 101 101 $this->assertFalse( $active ); 102 102 $this->assertInstanceOf( 'WP_Customize_Panel', $panel ); … … 108 108 * @see WP_Customize_Panel::json() 109 109 */ 110 function test_json() {110 public function test_json() { 111 111 $args = array( 112 112 'priority' => 200, … … 132 132 * @see WP_Customize_Panel::check_capabilities() 133 133 */ 134 function test_check_capabilities() {134 public function test_check_capabilities() { 135 135 $user_id = self::factory()->user->create( array( 'role' => 'administrator' ) ); 136 136 wp_set_current_user( $user_id ); … … 150 150 * @see WP_Customize_Panel::get_content() 151 151 */ 152 function test_get_content() {152 public function test_get_content() { 153 153 $panel = new WP_Customize_Panel( $this->manager, 'foo' ); 154 154 $this->assertEmpty( $panel->get_content() ); … … 158 158 * @see WP_Customize_Panel::maybe_render() 159 159 */ 160 function test_maybe_render() {160 public function test_maybe_render() { 161 161 wp_set_current_user( self::factory()->user->create( array( 'role' => 'administrator' ) ) ); 162 162 $panel = new WP_Customize_Panel( $this->manager, 'bar' ); … … 176 176 * @param WP_Customize_Panel $panel 177 177 */ 178 function action_customize_render_panel_test( $panel ) {178 public function action_customize_render_panel_test( $panel ) { 179 179 $this->assertInstanceOf( 'WP_Customize_Panel', $panel ); 180 180 } … … 183 183 * @see WP_Customize_Panel::print_template() 184 184 */ 185 function test_print_templates_standard() {185 public function test_print_templates_standard() { 186 186 wp_set_current_user( self::factory()->user->create( array( 'role' => 'administrator' ) ) ); 187 187 … … 201 201 * @see WP_Customize_Panel::print_template() 202 202 */ 203 function test_print_templates_custom() {203 public function test_print_templates_custom() { 204 204 wp_set_current_user( self::factory()->user->create( array( 'role' => 'administrator' ) ) ); 205 205
Note: See TracChangeset
for help on using the changeset viewer.