Changeset 28757
- Timestamp:
- 06/16/2014 03:07:37 PM (11 years ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/getArchives.php
r28379 r28757 34 34 35 35 $expected['limit'] = <<<EOF 36 <li><a href='http:// example.org/?p={$ids[0]}'>Post title 8</a></li>37 <li><a href='http:// example.org/?p={$ids[1]}'>Post title 7</a></li>38 <li><a href='http:// example.org/?p={$ids[2]}'>Post title 6</a></li>39 <li><a href='http:// example.org/?p={$ids[3]}'>Post title 5</a></li>40 <li><a href='http:// example.org/?p={$ids[4]}'>Post title 4</a></li>36 <li><a href='http://{WP_TESTS_DOMAIN}/?p={$ids[0]}'>Post title 8</a></li> 37 <li><a href='http://{WP_TESTS_DOMAIN}/?p={$ids[1]}'>Post title 7</a></li> 38 <li><a href='http://{WP_TESTS_DOMAIN}/?p={$ids[2]}'>Post title 6</a></li> 39 <li><a href='http://{WP_TESTS_DOMAIN}/?p={$ids[3]}'>Post title 5</a></li> 40 <li><a href='http://{WP_TESTS_DOMAIN}/?p={$ids[4]}'>Post title 4</a></li> 41 41 EOF; 42 $expected['limit'] = str_replace( '{WP_TESTS_DOMAIN}', WP_TESTS_DOMAIN, $expected['limit'] ); 43 42 44 $this->assertEquals( $expected['limit'], trim( wp_get_archives( array( 'echo' => false, 'type' => 'postbypost', 'limit' => 5 ) ) ) ); 43 45 } -
trunk/tests/phpunit/tests/user/listAuthors.php
r27684 r28757 84 84 85 85 function test_wp_list_authors_feed() { 86 $expected['feed'] = '<li><a href="' . $this->user_urls[1] . '" title="Posts by bob">bob</a> (<a href="http:// example.org/?feed=rss2&author=' . $this->users[1] . '">link to feed</a>)</li><li><a href="' . $this->user_urls[2] . '" title="Posts by paul">paul</a> (<a href="http://example.org/?feed=rss2&author=' . $this->users[2] . '">link to feed</a>)</li><li><a href="' . $this->user_urls[0] . '" title="Posts by zack">zack</a> (<a href="http://example.org/?feed=rss2&author=' . $this->users[0] . '">link to feed</a>)</li>';86 $expected['feed'] = '<li><a href="' . $this->user_urls[1] . '" title="Posts by bob">bob</a> (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&author=' . $this->users[1] . '">link to feed</a>)</li><li><a href="' . $this->user_urls[2] . '" title="Posts by paul">paul</a> (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&author=' . $this->users[2] . '">link to feed</a>)</li><li><a href="' . $this->user_urls[0] . '" title="Posts by zack">zack</a> (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&author=' . $this->users[0] . '">link to feed</a>)</li>'; 87 87 $this->AssertEquals( $expected['feed'], wp_list_authors( array( 'echo' => false, 'feed' => 'link to feed' ) ) ); 88 88 } 89 89 90 90 function test_wp_list_authors_feed_image() { 91 $expected['feed_image'] = '<li><a href="' . $this->user_urls[1] . '" title="Posts by bob">bob</a> <a href="http:// example.org/?feed=rss2&author=' . $this->users[1] . '"><img src="http://example.com/path/to/a/graphic.png" style="border: none;" /></a></li><li><a href="' . $this->user_urls[2] . '" title="Posts by paul">paul</a> <a href="http://example.org/?feed=rss2&author=' . $this->users[2] . '"><img src="http://example.com/path/to/a/graphic.png" style="border: none;" /></a></li><li><a href="' . $this->user_urls[0] . '" title="Posts by zack">zack</a> <a href="http://example.org/?feed=rss2&author=' . $this->users[0] . '"><img src="http://example.com/path/to/a/graphic.png" style="border: none;" /></a></li>';92 $this->AssertEquals( $expected['feed_image'], wp_list_authors( array( 'echo' => false, 'feed_image' => 'example.com/path/to/a/graphic.png' ) ) );91 $expected['feed_image'] = '<li><a href="' . $this->user_urls[1] . '" title="Posts by bob">bob</a> <a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&author=' . $this->users[1] . '"><img src="http://' . WP_TESTS_DOMAIN . '/path/to/a/graphic.png" style="border: none;" /></a></li><li><a href="' . $this->user_urls[2] . '" title="Posts by paul">paul</a> <a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&author=' . $this->users[2] . '"><img src="http://' . WP_TESTS_DOMAIN . '/path/to/a/graphic.png" style="border: none;" /></a></li><li><a href="' . $this->user_urls[0] . '" title="Posts by zack">zack</a> <a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&author=' . $this->users[0] . '"><img src="http://' . WP_TESTS_DOMAIN . '/path/to/a/graphic.png" style="border: none;" /></a></li>'; 92 $this->AssertEquals( $expected['feed_image'], wp_list_authors( array( 'echo' => false, 'feed_image' => WP_TESTS_DOMAIN . '/path/to/a/graphic.png' ) ) ); 93 93 } 94 94 … … 97 97 */ 98 98 function test_wp_list_authors_feed_type() { 99 $expected['feed_type'] = '<li><a href="' . $this->user_urls[1] . '" title="Posts by bob">bob</a> (<a href="http:// example.org/?feed=atom&author=' . $this->users[1] . '">link to feed</a>)</li><li><a href="' . $this->user_urls[2] . '" title="Posts by paul">paul</a> (<a href="http://example.org/?feed=atom&author=' . $this->users[2] . '">link to feed</a>)</li><li><a href="' . $this->user_urls[0] . '" title="Posts by zack">zack</a> (<a href="http://example.org/?feed=atom&author=' . $this->users[0] . '">link to feed</a>)</li>';99 $expected['feed_type'] = '<li><a href="' . $this->user_urls[1] . '" title="Posts by bob">bob</a> (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=atom&author=' . $this->users[1] . '">link to feed</a>)</li><li><a href="' . $this->user_urls[2] . '" title="Posts by paul">paul</a> (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=atom&author=' . $this->users[2] . '">link to feed</a>)</li><li><a href="' . $this->user_urls[0] . '" title="Posts by zack">zack</a> (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=atom&author=' . $this->users[0] . '">link to feed</a>)</li>'; 100 100 $this->AssertEquals( $expected['feed_type'], wp_list_authors( array( 'echo' => false, 'feed' => 'link to feed', 'feed_type' => 'atom' ) ) ); 101 101 }
Note: See TracChangeset
for help on using the changeset viewer.