Changeset 48937 for trunk/tests/phpunit/tests/post/template.php
- Timestamp:
- 09/02/2020 12:35:36 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/template.php
r47122 r48937 22 22 $output = wp_link_pages( array( 'echo' => 0 ) ); 23 23 24 $this->assert Equals( $expected, $output );24 $this->assertSame( $expected, $output ); 25 25 26 26 $before_after = " <span class=\"post-page-numbers current\" aria-current=\"page\">1</span> {$page2}2</a> {$page3}3</a>"; … … 33 33 ); 34 34 35 $this->assert Equals( $before_after, $output );35 $this->assertSame( $before_after, $output ); 36 36 37 37 $separator = " <span class=\"post-page-numbers current\" aria-current=\"page\">1</span>{$page2}2</a>{$page3}3</a>"; … … 45 45 ); 46 46 47 $this->assert Equals( $separator, $output );47 $this->assertSame( $separator, $output ); 48 48 49 49 $link = " <span class=\"post-page-numbers current\" aria-current=\"page\"><em>1</em></span>{$page2}<em>2</em></a>{$page3}<em>3</em></a>"; … … 59 59 ); 60 60 61 $this->assert Equals( $link, $output );61 $this->assertSame( $link, $output ); 62 62 63 63 $next = "{$page2}<em>Next page</em></a>"; … … 74 74 ); 75 75 76 $this->assert Equals( $next, $output );76 $this->assertSame( $next, $output ); 77 77 78 78 $GLOBALS['page'] = 2; … … 90 90 ); 91 91 92 $this->assert Equals( $next_prev, $output );92 $this->assertSame( $next_prev, $output ); 93 93 94 94 $next_prev_link = "{$permalink}Woo page</a>{$page3}Hoo page</a>"; … … 105 105 ); 106 106 107 $this->assert Equals( $next_prev_link, $output );107 $this->assertSame( $next_prev_link, $output ); 108 108 109 109 $GLOBALS['page'] = 1; … … 116 116 ); 117 117 118 $this->assert Equals( $separator, $output );118 $this->assertSame( $separator, $output ); 119 119 120 120 $pagelink = " <span class=\"post-page-numbers current\" aria-current=\"page\">Page 1</span> | {$page2}Page 2</a> | {$page3}Page 3</a>"; … … 129 129 ); 130 130 131 $this->assert Equals( $pagelink, $output );131 $this->assertSame( $pagelink, $output ); 132 132 } 133 133 … … 165 165 166 166 $output = wp_dropdown_pages( array( 'echo' => 0 ) ); 167 $this->assert EqualsIgnoreEOL( $lineage, $output );167 $this->assertSameIgnoreEOL( $lineage, $output ); 168 168 169 169 $depth = <<<DEPTH … … 180 180 ) 181 181 ); 182 $this->assert EqualsIgnoreEOL( $depth, $output );182 $this->assertSameIgnoreEOL( $depth, $output ); 183 183 184 184 $option_none = <<<NONE … … 198 198 ) 199 199 ); 200 $this->assert EqualsIgnoreEOL( $option_none, $output );200 $this->assertSameIgnoreEOL( $option_none, $output ); 201 201 202 202 $option_no_change = <<<NO … … 218 218 ) 219 219 ); 220 $this->assert EqualsIgnoreEOL( $option_no_change, $output );220 $this->assertSameIgnoreEOL( $option_no_change, $output ); 221 221 } 222 222 … … 354 354 ); 355 355 356 $this->assert Equals( '', get_page_template_slug( $page_id ) );356 $this->assertSame( '', get_page_template_slug( $page_id ) ); 357 357 358 358 update_post_meta( $page_id, '_wp_page_template', 'default' ); 359 $this->assert Equals( '', get_page_template_slug( $page_id ) );359 $this->assertSame( '', get_page_template_slug( $page_id ) ); 360 360 361 361 update_post_meta( $page_id, '_wp_page_template', 'example.php' ); 362 $this->assert Equals( 'example.php', get_page_template_slug( $page_id ) );362 $this->assertSame( 'example.php', get_page_template_slug( $page_id ) ); 363 363 } 364 364 … … 376 376 $this->go_to( get_permalink( $page_id ) ); 377 377 378 $this->assert Equals( 'example.php', get_page_template_slug() );378 $this->assertSame( 'example.php', get_page_template_slug() ); 379 379 } 380 380 … … 386 386 $post_id = self::factory()->post->create(); 387 387 388 $this->assert Equals( '', get_page_template_slug( $post_id ) );388 $this->assertSame( '', get_page_template_slug( $post_id ) ); 389 389 390 390 update_post_meta( $post_id, '_wp_page_template', 'default' ); 391 391 392 $this->assert Equals( '', get_page_template_slug( $post_id ) );392 $this->assertSame( '', get_page_template_slug( $post_id ) ); 393 393 394 394 update_post_meta( $post_id, '_wp_page_template', 'example.php' ); 395 $this->assert Equals( 'example.php', get_page_template_slug( $post_id ) );395 $this->assertSame( 'example.php', get_page_template_slug( $post_id ) ); 396 396 } 397 397 … … 406 406 $this->go_to( get_permalink( $post_id ) ); 407 407 408 $this->assert Equals( 'example.php', get_page_template_slug() );408 $this->assertSame( 'example.php', get_page_template_slug() ); 409 409 } 410 410
Note: See TracChangeset
for help on using the changeset viewer.