Changeset 51462 for trunk/tests/phpunit/tests/admin/includesPost.php
- Timestamp:
- 07/19/2021 02:00:11 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesPost.php
r51027 r51462 392 392 393 393 $found = get_sample_permalink_html( $p ); 394 $this->assert Contains( 'href="' . get_option( 'home' ) . '/?p=' . $p . '"', $found );395 $this->assert Contains( '>' . get_option( 'home' ) . '/?p=' . $p . '<', $found );394 $this->assertStringContainsString( 'href="' . get_option( 'home' ) . '/?p=' . $p . '"', $found ); 395 $this->assertStringContainsString( '>' . get_option( 'home' ) . '/?p=' . $p . '<', $found ); 396 396 } 397 397 … … 416 416 $found = get_sample_permalink_html( $p ); 417 417 $post = get_post( $p ); 418 $this->assert Contains( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found );419 $this->assert Contains( '>' . urldecode( $post->post_name ) . '<', $found );418 $this->assertStringContainsString( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found ); 419 $this->assertStringContainsString( '>' . urldecode( $post->post_name ) . '<', $found ); 420 420 } 421 421 … … 441 441 $found = get_sample_permalink_html( $p ); 442 442 $post = get_post( $p ); 443 $this->assert Contains( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found );444 $this->assert Contains( '>' . urldecode( get_permalink( $post ) ) . '<', $found );443 $this->assertStringContainsString( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found ); 444 $this->assertStringContainsString( '>' . urldecode( get_permalink( $post ) ) . '<', $found ); 445 445 } 446 446 … … 465 465 $post = get_post( $p ); 466 466 $message = 'Published post'; 467 $this->assert Contains( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found, $message );468 $this->assert Contains( '>new_slug-صورة<', $found, $message );467 $this->assertStringContainsString( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found, $message ); 468 $this->assertStringContainsString( '>new_slug-صورة<', $found, $message ); 469 469 470 470 // Scheduled posts should use published permalink. … … 481 481 $post = get_post( $p ); 482 482 $message = 'Scheduled post'; 483 $this->assert Contains( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found, $message );484 $this->assert Contains( '>new_slug-صورة<', $found, $message );483 $this->assertStringContainsString( 'href="' . get_option( 'home' ) . '/' . $post->post_name . '/"', $found, $message ); 484 $this->assertStringContainsString( '>new_slug-صورة<', $found, $message ); 485 485 486 486 // Draft posts should use preview link. … … 499 499 $preview_link = add_query_arg( 'preview', 'true', $preview_link ); 500 500 501 $this->assert Contains( 'href="' . esc_url( $preview_link ) . '"', $found, $message );502 $this->assert Contains( '>new_slug-صورة<', $found, $message );501 $this->assertStringContainsString( 'href="' . esc_url( $preview_link ) . '"', $found, $message ); 502 $this->assertStringContainsString( '>new_slug-صورة<', $found, $message ); 503 503 } 504 504 … … 523 523 $found = get_sample_permalink_html( $p ); 524 524 $post = get_post( $p ); 525 $this->assert Contains( 'href="' . esc_url( get_preview_post_link( $post ) ), $found );525 $this->assertStringContainsString( 'href="' . esc_url( get_preview_post_link( $post ) ), $found ); 526 526 } 527 527
Note: See TracChangeset
for help on using the changeset viewer.