- 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-ajax.php
r47198 r48937 80 80 $output = json_decode( ob_get_clean(), true ); 81 81 $this->assertFalse( $output['success'] ); 82 $this->assert Equals( 'expected_customize_preview', $output['data'] );82 $this->assertSame( 'expected_customize_preview', $output['data'] ); 83 83 84 84 // Check expected_customize_preview. … … 93 93 $output = json_decode( ob_get_clean(), true ); 94 94 $this->assertFalse( $output['success'] ); 95 $this->assert Equals( 'expected_customize_preview', $output['data'] );95 $this->assertSame( 'expected_customize_preview', $output['data'] ); 96 96 97 97 // Check missing_partials. … … 105 105 $output = json_decode( ob_get_clean(), true ); 106 106 $this->assertFalse( $output['success'] ); 107 $this->assert Equals( 'missing_partials', $output['data'] );107 $this->assertSame( 'missing_partials', $output['data'] ); 108 108 109 109 // Check missing_partials. … … 114 114 $this->selective_refresh->handle_render_partials_request(); 115 115 } catch ( WPDieException $e ) { 116 $this->assert Equals( '', $e->getMessage() );116 $this->assertSame( '', $e->getMessage() ); 117 117 } 118 118 $output = json_decode( ob_get_clean(), true ); 119 119 $this->assertFalse( $output['success'] ); 120 $this->assert Equals( 'malformed_partials', $output['data'] );120 $this->assertSame( 'malformed_partials', $output['data'] ); 121 121 } 122 122 … … 157 157 $this->selective_refresh->handle_render_partials_request(); 158 158 } catch ( WPDieException $e ) { 159 $this->assert Equals( '', $e->getMessage() );159 $this->assertSame( '', $e->getMessage() ); 160 160 } 161 161 $output = json_decode( ob_get_clean(), true ); … … 165 165 $this->assertArrayHasKey( 'errors', $output['data'] ); 166 166 $this->assertArrayHasKey( 'foo', $output['data']['contents'] ); 167 $this->assert Equals( null,$output['data']['contents']['foo'] );167 $this->assertNull( $output['data']['contents']['foo'] ); 168 168 } 169 169 … … 199 199 $this->selective_refresh->handle_render_partials_request(); 200 200 } catch ( WPDieException $e ) { 201 $this->assert Equals( '', $e->getMessage() );201 $this->assertSame( '', $e->getMessage() ); 202 202 } 203 203 $this->assertEquals( $count_customize_render_partials_before + 1, has_action( 'customize_render_partials_before' ) ); 204 204 $this->assertEquals( $count_customize_render_partials_after + 1, has_action( 'customize_render_partials_after' ) ); 205 205 $output = json_decode( ob_get_clean(), true ); 206 $this->assert Equals( array( false ), $output['data']['contents']['foo'] );206 $this->assertSame( array( false ), $output['data']['contents']['foo'] ); 207 207 } 208 208 … … 237 237 $this->selective_refresh->handle_render_partials_request(); 238 238 } catch ( WPDieException $e ) { 239 $this->assert Equals( '', $e->getMessage() );239 $this->assertSame( '', $e->getMessage() ); 240 240 } 241 241 $output = json_decode( ob_get_clean(), true ); … … 267 267 $this->selective_refresh->handle_render_partials_request(); 268 268 } catch ( WPDieException $e ) { 269 $this->assert Equals( '', $e->getMessage() );269 $this->assertSame( '', $e->getMessage() ); 270 270 } 271 271 $output = json_decode( ob_get_clean(), true ); … … 337 337 $this->selective_refresh->handle_render_partials_request(); 338 338 } catch ( WPDieException $e ) { 339 $this->assert Equals( '', $e->getMessage() );339 $this->assertSame( '', $e->getMessage() ); 340 340 } 341 341 $this->assertEquals( $count_customize_render_partials_before + 1, has_action( 'customize_render_partials_before' ) ); 342 342 $this->assertEquals( $count_customize_render_partials_after + 1, has_action( 'customize_render_partials_after' ) ); 343 343 $output = json_decode( ob_get_clean(), true ); 344 $this->assert Equals( array( get_bloginfo( 'name', 'display' ) ), $output['data']['contents']['test_blogname'] );344 $this->assertSame( array( get_bloginfo( 'name', 'display' ) ), $output['data']['contents']['test_blogname'] ); 345 345 $this->assertArrayHasKey( 'setting_validities', $output['data'] ); 346 346 } … … 446 446 $this->selective_refresh->handle_render_partials_request(); 447 447 } catch ( WPDieException $e ) { 448 $this->assert Equals( '', $e->getMessage() );448 $this->assertSame( '', $e->getMessage() ); 449 449 } 450 450 $this->assertEquals( $count_customize_render_partials_before + 1, has_action( 'customize_render_partials_before' ) ); 451 451 $this->assertEquals( $count_customize_render_partials_after + 1, has_action( 'customize_render_partials_after' ) ); 452 452 $output = json_decode( ob_get_clean(), true ); 453 $this->assert Equals( array( get_bloginfo( 'name', 'display' ) ), $output['data']['contents']['test_dynamic_blogname'] );453 $this->assertSame( array( get_bloginfo( 'name', 'display' ) ), $output['data']['contents']['test_dynamic_blogname'] ); 454 454 } 455 455 … … 498 498 $this->selective_refresh->handle_render_partials_request(); 499 499 } catch ( WPDieException $e ) { 500 $this->assert Equals( '', $e->getMessage() );500 $this->assertSame( '', $e->getMessage() ); 501 501 } 502 502 $this->assertEquals( $count_customize_render_partials_before + 1, has_action( 'customize_render_partials_before' ) ); 503 503 $this->assertEquals( $count_customize_render_partials_after + 1, has_action( 'customize_render_partials_after' ) ); 504 504 $output = json_decode( ob_get_clean(), true ); 505 $this->assert Equals( array( get_bloginfo( 'name', 'display' ) ), $output['data']['contents']['test_blogname'] );506 $this->assert Equals( array_fill( 0, 2, get_bloginfo( 'description', 'display' ) ), $output['data']['contents']['test_blogdescription'] );505 $this->assertSame( array( get_bloginfo( 'name', 'display' ) ), $output['data']['contents']['test_blogname'] ); 506 $this->assertSame( array_fill( 0, 2, get_bloginfo( 'description', 'display' ) ), $output['data']['contents']['test_blogdescription'] ); 507 507 } 508 508
Note: See TracChangeset
for help on using the changeset viewer.