Changeset 48937 for trunk/tests/phpunit/tests/customize/panel.php
- Timestamp:
- 09/02/2020 12:35:36 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/panel.php
r47198 r48937 33 33 $panel = new WP_Customize_Panel( $this->manager, 'foo' ); 34 34 $this->assertInternalType( 'int', $panel->instance_number ); 35 $this->assert Equals( $this->manager, $panel->manager );36 $this->assert Equals( 'foo', $panel->id );37 $this->assert Equals( 160, $panel->priority );38 $this->assert Equals( 'edit_theme_options', $panel->capability );39 $this->assert Equals( '', $panel->theme_supports );40 $this->assert Equals( '', $panel->title );41 $this->assert Equals( '', $panel->description );35 $this->assertSame( $this->manager, $panel->manager ); 36 $this->assertSame( 'foo', $panel->id ); 37 $this->assertSame( 160, $panel->priority ); 38 $this->assertSame( 'edit_theme_options', $panel->capability ); 39 $this->assertSame( '', $panel->theme_supports ); 40 $this->assertSame( '', $panel->title ); 41 $this->assertSame( '', $panel->description ); 42 42 $this->assertEmpty( $panel->sections ); 43 $this->assert Equals( 'default', $panel->type );44 $this->assert Equals( array( $panel, 'active_callback' ), $panel->active_callback );43 $this->assertSame( 'default', $panel->type ); 44 $this->assertSame( array( $panel, 'active_callback' ), $panel->active_callback ); 45 45 } 46 46 … … 61 61 $panel = new WP_Customize_Panel( $this->manager, 'foo', $args ); 62 62 foreach ( $args as $key => $value ) { 63 $this->assert Equals( $value, $panel->$key );63 $this->assertSame( $value, $panel->$key ); 64 64 } 65 65 } … … 70 70 function test_construct_custom_type() { 71 71 $panel = new Custom_Panel_Test( $this->manager, 'foo' ); 72 $this->assert Equals( 'titleless', $panel->type );72 $this->assertSame( 'titleless', $panel->type ); 73 73 } 74 74 … … 120 120 $panel = new WP_Customize_Panel( $this->manager, 'foo', $args ); 121 121 $data = $panel->json(); 122 $this->assert Equals( 'foo', $data['id'] );122 $this->assertSame( 'foo', $data['id'] ); 123 123 foreach ( array( 'title', 'description', 'priority', 'type' ) as $key ) { 124 $this->assert Equals( $args[ $key ], $data[ $key ] );124 $this->assertSame( $args[ $key ], $data[ $key ] ); 125 125 } 126 126 $this->assertEmpty( $data['content'] ); … … 168 168 $this->assertTrue( $panel->check_capabilities() ); 169 169 $this->assertEmpty( $content ); 170 $this->assert Equals( $customize_render_panel_count + 1, did_action( 'customize_render_panel' ), 'Unexpected did_action count for customize_render_panel' );171 $this->assert Equals( 1, did_action( "customize_render_panel_{$panel->id}" ), "Unexpected did_action count for customize_render_panel_{$panel->id}" );170 $this->assertSame( $customize_render_panel_count + 1, did_action( 'customize_render_panel' ), 'Unexpected did_action count for customize_render_panel' ); 171 $this->assertSame( 1, did_action( "customize_render_panel_{$panel->id}" ), "Unexpected did_action count for customize_render_panel_{$panel->id}" ); 172 172 } 173 173
Note: See TracChangeset
for help on using the changeset viewer.