- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/selective-refresh.php
r48100 r48937 46 46 */ 47 47 function test_construct() { 48 $this->assert Equals( $this->selective_refresh, $this->wp_customize->selective_refresh );48 $this->assertSame( $this->selective_refresh, $this->wp_customize->selective_refresh ); 49 49 } 50 50 … … 84 84 function test_crud_partial() { 85 85 $partial = $this->selective_refresh->add_partial( 'foo' ); 86 $this->assert Equals( $this->selective_refresh, $partial->component );86 $this->assertSame( $this->selective_refresh, $partial->component ); 87 87 $this->assertInstanceOf( 'WP_Customize_Partial', $partial ); 88 $this->assert Equals( $partial, $this->selective_refresh->get_partial( $partial->id ) );88 $this->assertSame( $partial, $this->selective_refresh->get_partial( $partial->id ) ); 89 89 $this->assertArrayHasKey( $partial->id, $this->selective_refresh->partials() ); 90 90 … … 94 94 95 95 $partial = new WP_Customize_Partial( $this->selective_refresh, 'bar' ); 96 $this->assert Equals( $partial, $this->selective_refresh->add_partial( $partial ) );97 $this->assert Equals( $partial, $this->selective_refresh->get_partial( 'bar' ) );96 $this->assertSame( $partial, $this->selective_refresh->add_partial( $partial ) ); 97 $this->assertSame( $partial, $this->selective_refresh->get_partial( 'bar' ) ); 98 98 $this->assertEqualSets( array( 'bar' ), array_keys( $this->selective_refresh->partials() ) ); 99 99 … … 103 103 $partial = $this->selective_refresh->add_partial( 'recognized-class' ); 104 104 $this->assertInstanceOf( 'Tested_Custom_Partial', $partial ); 105 $this->assert Equals( '.recognized', $partial->selector );105 $this->assertSame( '.recognized', $partial->selector ); 106 106 } 107 107 … … 113 113 function test_init_preview() { 114 114 $this->selective_refresh->init_preview(); 115 $this->assert Equals( 10, has_action( 'template_redirect', array( $this->selective_refresh, 'handle_render_partials_request' ) ) );116 $this->assert Equals( 10, has_action( 'wp_enqueue_scripts', array( $this->selective_refresh, 'enqueue_preview_scripts' ) ) );115 $this->assertSame( 10, has_action( 'template_redirect', array( $this->selective_refresh, 'handle_render_partials_request' ) ) ); 116 $this->assertSame( 10, has_action( 'wp_enqueue_scripts', array( $this->selective_refresh, 'enqueue_preview_scripts' ) ) ); 117 117 } 118 118 … … 127 127 $this->selective_refresh->enqueue_preview_scripts(); 128 128 $this->assertContains( 'customize-selective-refresh', $scripts->queue ); 129 $this->assert Equals( 1000, has_action( 'wp_footer', array( $this->selective_refresh, 'export_preview_data' ) ) );129 $this->assertSame( 1000, has_action( 'wp_footer', array( $this->selective_refresh, 'export_preview_data' ) ) ); 130 130 } 131 131 … … 169 169 $this->assertArrayHasKey( 'blogname', $exported_data['partials'] ); 170 170 $this->assertArrayNotHasKey( 'top_secret_message', $exported_data['partials'] ); 171 $this->assert Equals( '#site-title', $exported_data['partials']['blogname']['selector'] );171 $this->assertSame( '#site-title', $exported_data['partials']['blogname']['selector'] ); 172 172 $this->assertArrayHasKey( 'renderQueryVar', $exported_data ); 173 173 $this->assertArrayHasKey( 'l10n', $exported_data ); … … 195 195 $this->assertInstanceOf( 'Tested_Custom_Partial', $this->selective_refresh->get_partial( 'recognized-class' ) ); 196 196 $this->assertNotInstanceOf( 'Tested_Custom_Partial', $this->selective_refresh->get_partial( 'recognized' ) ); 197 $this->assert Equals( '.recognized', $this->selective_refresh->get_partial( 'recognized' )->selector );197 $this->assertSame( '.recognized', $this->selective_refresh->get_partial( 'recognized' )->selector ); 198 198 } 199 199
Note: See TracChangeset
for help on using the changeset viewer.