Changeset 38523 for trunk/tests/phpunit/tests/post/listPages.php
- Timestamp:
- 09/06/2016 09:05:45 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/listPages.php
r35242 r38523 18 18 'link_after' => '', 19 19 'walker' => '', 20 'item_spacing' => 'preserve', 20 21 'include' => '', 21 22 'post_type' => 'page', … … 343 344 $this->AssertEquals( $expected['exclude'], $actual ); 344 345 } 346 347 function test_wp_list_pages_discarded_whitespace() { 348 $args = array( 349 'echo' => false, 350 'item_spacing' => 'discard', 351 ); 352 $expected['default'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-1 page_item_has_children"><a href="' . get_permalink( 1 ) . '">Parent 1</a><ul class=\'children\'><li class="page_item page-item-4"><a href="' . get_permalink( 4 ) . '">Child 1</a></li><li class="page_item page-item-5"><a href="' . get_permalink( 5 ) . '">Child 2</a></li><li class="page_item page-item-6"><a href="' . get_permalink( 6 ) . '">Child 3</a></li></ul></li><li class="page_item page-item-2 page_item_has_children"><a href="' . get_permalink( 2 ) . '">Parent 2</a><ul class=\'children\'><li class="page_item page-item-7"><a href="' . get_permalink( 7 ) . '">Child 1</a></li><li class="page_item page-item-8"><a href="' . get_permalink( 8 ) . '">Child 2</a></li><li class="page_item page-item-9"><a href="' . get_permalink( 9 ) . '">Child 3</a></li></ul></li><li class="page_item page-item-3 page_item_has_children"><a href="' . get_permalink( 3 ) . '">Parent 3</a><ul class=\'children\'><li class="page_item page-item-10"><a href="' . get_permalink( 10 ) . '">Child 1</a></li><li class="page_item page-item-11"><a href="' . get_permalink( 11 ) . '">Child 2</a></li><li class="page_item page-item-12"><a href="' . get_permalink( 12 ) . '">Child 3</a></li></ul></li></ul></li>'; 353 $actual = wp_list_pages( $args ); 354 $this->AssertEquals( $expected['default'], $actual ); 355 } 345 356 }
Note: See TracChangeset
for help on using the changeset viewer.