Changeset 48937 for trunk/tests/phpunit/tests/oembed/WpEmbed.php
- Timestamp:
- 09/02/2020 12:35:36 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/oembed/WpEmbed.php
r44577 r48937 110 110 111 111 $actual = $this->wp_embed->autoembed( $content ); 112 $this->assert Equals( $content, $actual );112 $this->assertSame( $content, $actual ); 113 113 } 114 114 … … 125 125 wp_embed_unregister_handler( $handle ); 126 126 127 $this->assert Equals( "\nEmbedded http://example.com/embed/foo\n", $actual );127 $this->assertSame( "\nEmbedded http://example.com/embed/foo\n", $actual ); 128 128 } 129 129 … … 137 137 $this->wp_embed->delete_oembed_caches( $post_id ); 138 138 139 $this->assert Equals( array(), get_post_meta( $post_id, '_oembed_foo' ) );140 $this->assert Equals( array(), get_post_meta( $post_id, '_oembed_baz' ) );139 $this->assertSame( array(), get_post_meta( $post_id, '_oembed_foo' ) ); 140 $this->assertSame( array(), get_post_meta( $post_id, '_oembed_baz' ) ); 141 141 } 142 142 … … 169 169 170 170 $this->assertSame( $post_id, $this->wp_embed->post_ID ); 171 $this->assert Equals( $expected, get_post_meta( $post_id, $cachekey, true ) );171 $this->assertSame( $expected, get_post_meta( $post_id, $cachekey, true ) ); 172 172 $this->assertNotEmpty( get_post_meta( $post_id, $cachekey_time, true ) ); 173 173 } … … 195 195 unset( $post ); 196 196 197 $this->assert Equals( $expected, $actual );198 $this->assert Equals( $expected, $actual_2 );199 $this->assert Equals( $expected, $cached );197 $this->assertSame( $expected, $actual ); 198 $this->assertSame( $expected, $actual_2 ); 199 $this->assertSame( $expected, $cached ); 200 200 } 201 201 … … 226 226 unset( $post ); 227 227 228 $this->assert Equals( $expected, $actual );229 $this->assert Equals( '{{unknown}}', $cached );228 $this->assertSame( $expected, $actual ); 229 $this->assertSame( '{{unknown}}', $cached ); 230 230 $this->assertEmpty( $cached_time ); 231 $this->assert Equals( $expected, $actual_2 );231 $this->assertSame( $expected, $actual_2 ); 232 232 } 233 233 … … 253 253 254 254 $this->assertNotNull( $oembed_post_id ); 255 $this->assert Equals( $expected, $post_content );256 $this->assert Equals( $expected, $actual );257 $this->assert Equals( $expected, $actual_2 );255 $this->assertSame( $expected, $post_content ); 256 $this->assertSame( $expected, $actual ); 257 $this->assertSame( $expected, $actual_2 ); 258 258 } 259 259 … … 278 278 wp_delete_post( $oembed_post_id ); 279 279 280 $this->assert Equals( $expected, $actual );281 $this->assert Equals( $expected, $actual_2 );280 $this->assertSame( $expected, $actual ); 281 $this->assertSame( $expected, $actual_2 ); 282 282 $this->assertNotNull( $oembed_post_id ); 283 $this->assert Equals( '{{unknown}}', $post_content );283 $this->assertSame( '{{unknown}}', $post_content ); 284 284 } 285 285 … … 322 322 $actual = $this->wp_embed->shortcode( array( 'src' => $url ) ); 323 323 324 $this->assert Equals( '<a href="' . esc_url( $url ) . '">' . esc_html( $url ) . '</a>', $actual );324 $this->assertSame( '<a href="' . esc_url( $url ) . '">' . esc_html( $url ) . '</a>', $actual ); 325 325 } 326 326 … … 333 333 $actual = $this->wp_embed->shortcode( array(), $url ); 334 334 335 $this->assert Equals( '<a href="' . esc_url( $url ) . '">' . esc_html( $url ) . '</a>', $actual );335 $this->assertSame( '<a href="' . esc_url( $url ) . '">' . esc_html( $url ) . '</a>', $actual ); 336 336 } 337 337 … … 339 339 $url = 'http://example.com/embed/foo'; 340 340 $actual = $this->wp_embed->run_shortcode( '[embed]' . $url . '[/embed]' ); 341 $this->assert Equals( '<a href="' . esc_url( $url ) . '">' . esc_html( $url ) . '</a>', $actual );341 $this->assertSame( '<a href="' . esc_url( $url ) . '">' . esc_html( $url ) . '</a>', $actual ); 342 342 } 343 343 … … 346 346 $actual = $this->wp_embed->maybe_make_link( $url ); 347 347 348 $this->assert Equals( '<a href="' . esc_url( $url ) . '">' . esc_html( $url ) . '</a>', $actual );348 $this->assertSame( '<a href="' . esc_url( $url ) . '">' . esc_html( $url ) . '</a>', $actual ); 349 349 } 350 350 … … 358 358 359 359 $this->wp_embed->linkifunknown = false; 360 $this->assert Equals( $url, $this->wp_embed->maybe_make_link( $url ) );360 $this->assertSame( $url, $this->wp_embed->maybe_make_link( $url ) ); 361 361 } 362 362 }
Note: See TracChangeset
for help on using the changeset viewer.