From 16aa589a07587c7278f1aba8813e265cdd2d35a3 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 3 Jul 2014 02:13:08 +0000 Subject: [PATCH] URLs need to be generated, not hard-coded, in `user/listAuthors.php` test. See #28706. git-svn-id: https://develop.svn.wordpress.org/trunk@28968 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/user/listAuthors.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/user/listAuthors.php b/tests/phpunit/tests/user/listAuthors.php index 030d5f55f8..1f907fb778 100644 --- a/tests/phpunit/tests/user/listAuthors.php +++ b/tests/phpunit/tests/user/listAuthors.php @@ -83,12 +83,18 @@ class Tests_User_ListAuthors extends WP_UnitTestCase { } function test_wp_list_authors_feed() { - $expected['feed'] = '
  • bob (link to feed)
  • paul (link to feed)
  • zack (link to feed)
  • '; + $url0 = get_author_feed_link( $this->users[0] ); + $url1 = get_author_feed_link( $this->users[1] ); + $url2 = get_author_feed_link( $this->users[2] ); + $expected['feed'] = '
  • bob (link to feed)
  • paul (link to feed)
  • zack (link to feed)
  • '; $this->AssertEquals( $expected['feed'], wp_list_authors( array( 'echo' => false, 'feed' => 'link to feed' ) ) ); } function test_wp_list_authors_feed_image() { - $expected['feed_image'] = '
  • bob
  • paul
  • zack
  • '; + $url0 = get_author_feed_link( $this->users[0] ); + $url1 = get_author_feed_link( $this->users[1] ); + $url2 = get_author_feed_link( $this->users[2] ); + $expected['feed_image'] = '
  • bob
  • paul
  • zack
  • '; $this->AssertEquals( $expected['feed_image'], wp_list_authors( array( 'echo' => false, 'feed_image' => WP_TESTS_DOMAIN . '/path/to/a/graphic.png' ) ) ); } @@ -96,7 +102,10 @@ class Tests_User_ListAuthors extends WP_UnitTestCase { * @ticket 26538 */ function test_wp_list_authors_feed_type() { - $expected['feed_type'] = '
  • bob (link to feed)
  • paul (link to feed)
  • zack (link to feed)
  • '; + $url0 = get_author_feed_link( $this->users[0], 'atom' ); + $url1 = get_author_feed_link( $this->users[1], 'atom' ); + $url2 = get_author_feed_link( $this->users[2], 'atom' ); + $expected['feed_type'] = '
  • bob (link to feed)
  • paul (link to feed)
  • zack (link to feed)
  • '; $this->AssertEquals( $expected['feed_type'], wp_list_authors( array( 'echo' => false, 'feed' => 'link to feed', 'feed_type' => 'atom' ) ) ); }