Changeset 48937 for trunk/tests/phpunit/tests/customize/section.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/section.php
r47198 r48937 40 40 $section = new WP_Customize_Section( $this->manager, 'foo' ); 41 41 $this->assertInternalType( 'int', $section->instance_number ); 42 $this->assert Equals( $this->manager, $section->manager );43 $this->assert Equals( 'foo', $section->id );44 $this->assert Equals( 160, $section->priority );45 $this->assert Equals( 'edit_theme_options', $section->capability );46 $this->assert Equals( '', $section->theme_supports );47 $this->assert Equals( '', $section->title );48 $this->assert Equals( '', $section->description );42 $this->assertSame( $this->manager, $section->manager ); 43 $this->assertSame( 'foo', $section->id ); 44 $this->assertSame( 160, $section->priority ); 45 $this->assertSame( 'edit_theme_options', $section->capability ); 46 $this->assertSame( '', $section->theme_supports ); 47 $this->assertSame( '', $section->title ); 48 $this->assertSame( '', $section->description ); 49 49 $this->assertEmpty( $section->panel ); 50 $this->assert Equals( 'default', $section->type );51 $this->assert Equals( array( $section, 'active_callback' ), $section->active_callback );50 $this->assertSame( 'default', $section->type ); 51 $this->assertSame( array( $section, 'active_callback' ), $section->active_callback ); 52 52 } 53 53 … … 71 71 $section = new WP_Customize_Section( $this->manager, 'foo', $args ); 72 72 foreach ( $args as $key => $value ) { 73 $this->assert Equals( $value, $section->$key );73 $this->assertSame( $value, $section->$key ); 74 74 } 75 75 } … … 80 80 function test_construct_custom_type() { 81 81 $section = new Custom_Section_Test( $this->manager, 'foo' ); 82 $this->assert Equals( 'titleless', $section->type );82 $this->assertSame( 'titleless', $section->type ); 83 83 } 84 84 … … 134 134 $section = new WP_Customize_Section( $this->manager, 'foo', $args ); 135 135 $data = $section->json(); 136 $this->assert Equals( 'foo', $data['id'] );136 $this->assertSame( 'foo', $data['id'] ); 137 137 foreach ( array( 'title', 'description', 'priority', 'panel', 'type' ) as $key ) { 138 $this->assert Equals( $args[ $key ], $data[ $key ] );138 $this->assertSame( $args[ $key ], $data[ $key ] ); 139 139 } 140 140 $this->assertEmpty( $data['content'] ); … … 181 181 $this->assertTrue( $section->check_capabilities() ); 182 182 $this->assertEmpty( $content ); 183 $this->assert Equals( $customize_render_section_count + 1, did_action( 'customize_render_section' ), 'Unexpected did_action count for customize_render_section' );184 $this->assert Equals( 1, did_action( "customize_render_section_{$section->id}" ), "Unexpected did_action count for customize_render_section_{$section->id}" );183 $this->assertSame( $customize_render_section_count + 1, did_action( 'customize_render_section' ), 'Unexpected did_action count for customize_render_section' ); 184 $this->assertSame( 1, did_action( "customize_render_section_{$section->id}" ), "Unexpected did_action count for customize_render_section_{$section->id}" ); 185 185 } 186 186
Note: See TracChangeset
for help on using the changeset viewer.