Changeset 28960
- Timestamp:
- 07/02/2014 07:44:08 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/getArchives.php
r28757 r28960 33 33 $ids = array_slice( array_reverse( $this->post_ids ), 0, 5 ); 34 34 35 $link1 = get_permalink( $ids[0] ); 36 $link2 = get_permalink( $ids[1] ); 37 $link3 = get_permalink( $ids[2] ); 38 $link4 = get_permalink( $ids[3] ); 39 $link5 = get_permalink( $ids[4] ); 40 35 41 $expected['limit'] = <<<EOF 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>42 <li><a href='$link1'>Post title 8</a></li> 43 <li><a href='$link2'>Post title 7</a></li> 44 <li><a href='$link3'>Post title 6</a></li> 45 <li><a href='$link4'>Post title 5</a></li> 46 <li><a href='$link5'>Post title 4</a></li> 41 47 EOF; 42 $expected['limit'] = str_replace( '{WP_TESTS_DOMAIN}', WP_TESTS_DOMAIN, $expected['limit'] );43 44 48 $this->assertEquals( $expected['limit'], trim( wp_get_archives( array( 'echo' => false, 'type' => 'postbypost', 'limit' => 5 ) ) ) ); 45 49 }
Note: See TracChangeset
for help on using the changeset viewer.