- Timestamp:
- 11/30/2017 11:09:33 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/link/getPostTypeArchiveLink.php
r36225 r42343 10 10 public function test_get_post_archive_link_with_post_archive_on_front_page() { 11 11 update_option( 'show_on_front', 'posts' ); 12 $actual = get_post_type_archive_link( 'post' );12 $actual = get_post_type_archive_link( 'post' ); 13 13 $expected = get_home_url(); 14 14 $this->assertSame( $expected, $actual ); … … 19 19 */ 20 20 public function test_get_post_archive_link_with_post_archive_on_a_blog_page() { 21 $page_for_posts = $this->factory->post->create( array( 'post_title' => 'blog-page', 'post_type' => 'page' ) ); 21 $page_for_posts = $this->factory->post->create( 22 array( 23 'post_title' => 'blog-page', 24 'post_type' => 'page', 25 ) 26 ); 22 27 update_option( 'show_on_front', 'page' ); 23 28 update_option( 'page_for_posts', $page_for_posts ); 24 $actual = get_post_type_archive_link( 'post' );29 $actual = get_post_type_archive_link( 'post' ); 25 30 $expected = get_permalink( $page_for_posts ); 26 31 $this->assertSame( $expected, $actual );
Note: See TracChangeset
for help on using the changeset viewer.