Changeset 52010 for trunk/tests/phpunit/tests/customize/section.php
- Timestamp:
- 11/04/2021 03:22:47 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/section.php
r51568 r52010 20 20 protected $manager; 21 21 22 function set_up() {22 public function set_up() { 23 23 parent::set_up(); 24 24 require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; … … 28 28 } 29 29 30 function tear_down() {30 public function tear_down() { 31 31 $this->manager = null; 32 32 unset( $GLOBALS['wp_customize'] ); … … 37 37 * @see WP_Customize_Section::__construct() 38 38 */ 39 function test_construct_default_args() {39 public function test_construct_default_args() { 40 40 $section = new WP_Customize_Section( $this->manager, 'foo' ); 41 41 $this->assertIsInt( $section->instance_number ); … … 55 55 * @see WP_Customize_Section::__construct() 56 56 */ 57 function test_construct_custom_args() {57 public function test_construct_custom_args() { 58 58 $args = array( 59 59 'priority' => 200, … … 78 78 * @see WP_Customize_Section::__construct() 79 79 */ 80 function test_construct_custom_type() {80 public function test_construct_custom_type() { 81 81 $section = new Custom_Section_Test( $this->manager, 'foo' ); 82 82 $this->assertSame( 'titleless', $section->type ); … … 87 87 * @see WP_Customize_Section::active_callback() 88 88 */ 89 function test_active() {89 public function test_active() { 90 90 $section = new WP_Customize_Section( $this->manager, 'foo' ); 91 91 $this->assertTrue( $section->active() ); … … 108 108 * @return bool 109 109 */ 110 function filter_active_test( $active, $section ) {110 public function filter_active_test( $active, $section ) { 111 111 $this->assertFalse( $active ); 112 112 $this->assertInstanceOf( 'WP_Customize_Section', $section ); … … 118 118 * @see WP_Customize_Section::json() 119 119 */ 120 function test_json() {120 public function test_json() { 121 121 $args = array( 122 122 'priority' => 200, … … 146 146 * @see WP_Customize_Section::check_capabilities() 147 147 */ 148 function test_check_capabilities() {148 public function test_check_capabilities() { 149 149 wp_set_current_user( self::$admin_id ); 150 150 … … 163 163 * @see WP_Customize_Section::get_content() 164 164 */ 165 function test_get_content() {165 public function test_get_content() { 166 166 $section = new WP_Customize_Section( $this->manager, 'foo' ); 167 167 $this->assertEmpty( $section->get_content() ); … … 171 171 * @see WP_Customize_Section::maybe_render() 172 172 */ 173 function test_maybe_render() {173 public function test_maybe_render() { 174 174 wp_set_current_user( self::$admin_id ); 175 175 $section = new WP_Customize_Section( $this->manager, 'bar' ); … … 189 189 * @param WP_Customize_Section $section 190 190 */ 191 function action_customize_render_section_test( $section ) {191 public function action_customize_render_section_test( $section ) { 192 192 $this->assertInstanceOf( 'WP_Customize_Section', $section ); 193 193 } … … 196 196 * @see WP_Customize_Section::print_template() 197 197 */ 198 function test_print_templates_standard() {198 public function test_print_templates_standard() { 199 199 wp_set_current_user( self::$admin_id ); 200 200 … … 211 211 * @see WP_Customize_Section::print_template() 212 212 */ 213 function test_print_templates_custom() {213 public function test_print_templates_custom() { 214 214 wp_set_current_user( self::$admin_id ); 215 215
Note: See TracChangeset
for help on using the changeset viewer.