diff --git a/tests/phpunit/tests/functions/getArchives.php b/tests/phpunit/tests/functions/getArchives.php index bb6dbd9bd1..e08f930826 100644 --- a/tests/phpunit/tests/functions/getArchives.php +++ b/tests/phpunit/tests/functions/getArchives.php @@ -32,15 +32,19 @@ class Tests_Get_Archives extends WP_UnitTestCase { function test_wp_get_archives_limit() { $ids = array_slice( array_reverse( $this->post_ids ), 0, 5 ); - $expected['limit'] = <<Post title 8 -
  • Post title 7
  • -
  • Post title 6
  • -
  • Post title 5
  • -
  • Post title 4
  • -EOF; - $expected['limit'] = str_replace( '{WP_TESTS_DOMAIN}', WP_TESTS_DOMAIN, $expected['limit'] ); + $link1 = get_permalink( $ids[0] ); + $link2 = get_permalink( $ids[1] ); + $link3 = get_permalink( $ids[2] ); + $link4 = get_permalink( $ids[3] ); + $link5 = get_permalink( $ids[4] ); + $expected['limit'] = <<Post title 8 +
  • Post title 7
  • +
  • Post title 6
  • +
  • Post title 5
  • +
  • Post title 4
  • +EOF; $this->assertEquals( $expected['limit'], trim( wp_get_archives( array( 'echo' => false, 'type' => 'postbypost', 'limit' => 5 ) ) ) ); }