WordPress.org

Make WordPress Core

Changeset 42402


Ignore:
Timestamp:
12/15/2017 11:15:00 AM (2 years ago)
Author:
boonebgorges
Message:

Improve performance of wp_list_pages() tests.

The changeset also removes the use of hardcoded post/author IDs.

Props frank-klein.
Fixes #42903.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/listPages.php

    r42382 r42402  
    11<?php
    22
     3/**
     4 * @group post
     5 */
    36class Tests_List_Pages extends WP_UnitTestCase {
    4     var $pages;
    5 
    6     protected $time = null;
    7 
    8     /*
    9     $defaults = array(
    10         'depth' => 0,
    11         'show_date' => '',
    12         'date_format' => get_option('date_format'),
    13         'child_of' => 0,
    14         'exclude' => '',
    15         'title_li' => __('Pages'),
    16         'echo' => 1,
    17         'authors' => '',
    18         'sort_column' => 'menu_order, post_title',
    19         'link_before' => '',
    20         'link_after' => '',
    21         'walker' => '',
    22         'item_spacing' => 'preserve',
    23         'include'      => '',
    24         'post_type'    => 'page',
    25         'post_status'  => 'publish',
    26     );
    27     */
    28     function setUp() {
    29         parent::setUp();
    30         global $wpdb;
    31         $wpdb->query( 'TRUNCATE ' . $wpdb->prefix . 'posts' );
    32         $this->time = time();
    33         $post_date  = date( 'Y-m-d H:i:s', $this->time );
    34         $pages      = array();
    35         self::factory()->user->create();
    36         $pages[] = self::factory()->post->create(
     7    /**
     8     * Author user id.
     9     *
     10     * @var int
     11     */
     12    public static $author;
     13
     14    /**
     15     * Parent page id.
     16     *
     17     * @var int
     18     */
     19    public static $parent_1;
     20
     21    /**
     22     * Parent page id.
     23     *
     24     * @var int
     25     */
     26    public static $parent_2;
     27
     28    /**
     29     * Parent page id.
     30     *
     31     * @var int
     32     */
     33    public static $parent_3;
     34
     35    /**
     36     * Child page ids.
     37     *
     38     * @var array
     39     */
     40    public static $children = array();
     41
     42    /**
     43     * Current timestamp cache, so that it is consistent across posts.
     44     *
     45     * @var int
     46     */
     47    public static $time;
     48
     49    public static function wpSetupBeforeClass() {
     50        self::$time = time();
     51
     52        $post_date = date( 'Y-m-d H:i:s', self::$time );
     53
     54        self::$parent_1 = self::factory()->post->create(
    3755            array(
    3856                'post_type'  => 'page',
     
    4159            )
    4260        );
    43         $pages[] = self::factory()->post->create(
     61
     62        self::$author = self::factory()->user->create( array( 'role' => 'author' ) );
     63
     64        self::$parent_2 = self::factory()->post->create(
    4465            array(
    4566                'post_type'  => 'page',
     
    4869            )
    4970        );
    50         $pages[] = self::factory()->post->create(
     71
     72        self::$parent_3 = self::factory()->post->create(
    5173            array(
     74                'post_author' => self::$author,
    5275                'post_type'   => 'page',
    5376                'post_title'  => 'Parent 3',
    54                 'post_author' => '2',
    5577                'post_date'   => $post_date,
    5678            )
    5779        );
    5880
    59         foreach ( $pages as $page ) {
    60             $this->pages[ $page ] = self::factory()->post->create(
     81        foreach ( array( self::$parent_1, self::$parent_2, self::$parent_3 ) as $page ) {
     82            self::$children[ $page ][] = self::factory()->post->create(
    6183                array(
    6284                    'post_parent' => $page,
     
    6688                )
    6789            );
    68             $this->pages[ $page ] = self::factory()->post->create(
     90            self::$children[ $page ][] = self::factory()->post->create(
    6991                array(
    7092                    'post_parent' => $page,
     
    7496                )
    7597            );
    76             $this->pages[ $page ] = self::factory()->post->create(
     98            self::$children[ $page ][] = self::factory()->post->create(
    7799                array(
    78100                    'post_parent' => $page,
     
    86108
    87109    function test_wp_list_pages_default() {
    88         $args                = array(
     110        $args = array(
    89111            'echo' => false,
    90112        );
    91         $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>
    92 <ul class=\'children\'>
    93     <li class="page_item page-item-4"><a href="' . get_permalink( 4 ) . '">Child 1</a></li>
    94     <li class="page_item page-item-5"><a href="' . get_permalink( 5 ) . '">Child 2</a></li>
    95     <li class="page_item page-item-6"><a href="' . get_permalink( 6 ) . '">Child 3</a></li>
    96 </ul>
    97 </li>
    98 <li class="page_item page-item-2 page_item_has_children"><a href="' . get_permalink( 2 ) . '">Parent 2</a>
    99 <ul class=\'children\'>
    100     <li class="page_item page-item-7"><a href="' . get_permalink( 7 ) . '">Child 1</a></li>
    101     <li class="page_item page-item-8"><a href="' . get_permalink( 8 ) . '">Child 2</a></li>
    102     <li class="page_item page-item-9"><a href="' . get_permalink( 9 ) . '">Child 3</a></li>
    103 </ul>
    104 </li>
    105 <li class="page_item page-item-3 page_item_has_children"><a href="' . get_permalink( 3 ) . '">Parent 3</a>
    106 <ul class=\'children\'>
    107     <li class="page_item page-item-10"><a href="' . get_permalink( 10 ) . '">Child 1</a></li>
    108     <li class="page_item page-item-11"><a href="' . get_permalink( 11 ) . '">Child 2</a></li>
    109     <li class="page_item page-item-12"><a href="' . get_permalink( 12 ) . '">Child 3</a></li>
    110 </ul>
    111 </li>
    112 </ul></li>';
    113         $actual              = wp_list_pages( $args );
    114         $this->AssertEquals( $expected['default'], $actual );
     113
     114        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a>
     115<ul class=\'children\'>
     116    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][0] ) . '">Child 1</a></li>
     117    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][1] ) . '">Child 2</a></li>
     118    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][2] ) . '">Child 3</a></li>
     119</ul>
     120</li>
     121<li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">Parent 2</a>
     122<ul class=\'children\'>
     123    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][0] ) . '">Child 1</a></li>
     124    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][1] ) . '">Child 2</a></li>
     125    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][2] ) . '">Child 3</a></li>
     126</ul>
     127</li>
     128<li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a>
     129<ul class=\'children\'>
     130    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][0] ) . '">Child 1</a></li>
     131    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][1] ) . '">Child 2</a></li>
     132    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][2] ) . '">Child 3</a></li>
     133</ul>
     134</li>
     135</ul></li>';
     136
     137        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    115138    }
    116139
    117140    function test_wp_list_pages_depth() {
    118         $args              = array(
     141        $args = array(
    119142            'echo'  => false,
    120143            'depth' => 1,
    121144        );
    122         $expected['depth'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-1 page_item_has_children"><a href="' . get_permalink( 1 ) . '">Parent 1</a></li>
    123 <li class="page_item page-item-2 page_item_has_children"><a href="' . get_permalink( 2 ) . '">Parent 2</a></li>
    124 <li class="page_item page-item-3 page_item_has_children"><a href="' . get_permalink( 3 ) . '">Parent 3</a></li>
    125 </ul></li>';
    126         $actual            = wp_list_pages( $args );
    127         $this->AssertEquals( $expected['depth'], $actual );
     145
     146        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a></li>
     147<li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">Parent 2</a></li>
     148<li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a></li>
     149</ul></li>';
     150
     151        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    128152    }
    129153
    130154    function test_wp_list_pages_show_date() {
    131         $args                  = array(
     155        $args = array(
    132156            'echo'      => false,
    133157            'depth'     => 1,
    134158            'show_date' => true,
    135159        );
    136         $date                  = date( get_option( 'date_format' ), $this->time );
    137         $expected['show_date'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-1 page_item_has_children"><a href="' . get_permalink( 1 ) . '">Parent 1</a> ' . $date . '</li>
    138 <li class="page_item page-item-2 page_item_has_children"><a href="' . get_permalink( 2 ) . '">Parent 2</a> ' . $date . '</li>
    139 <li class="page_item page-item-3 page_item_has_children"><a href="' . get_permalink( 3 ) . '">Parent 3</a> ' . $date . '</li>
    140 </ul></li>';
    141         $actual                = wp_list_pages( $args );
    142         $this->AssertEquals( $expected['show_date'], $actual );
     160        $date = date( get_option( 'date_format' ), self::$time );
     161
     162        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a> ' . $date . '</li>
     163<li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">Parent 2</a> ' . $date . '</li>
     164<li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a> ' . $date . '</li>
     165</ul></li>';
     166
     167        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    143168    }
    144169
    145170    function test_wp_list_pages_date_format() {
    146         $args                    = array(
     171        $args = array(
    147172            'echo'        => false,
    148173            'show_date'   => true,
    149174            'date_format' => 'l, F j, Y',
    150175        );
    151         $date                    = date( $args['date_format'], $this->time );
    152         $expected['date_format'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-1 page_item_has_children"><a href="' . get_permalink( 1 ) . '">Parent 1</a> ' . $date . '
    153 <ul class=\'children\'>
    154     <li class="page_item page-item-4"><a href="' . get_permalink( 4 ) . '">Child 1</a> ' . $date . '</li>
    155     <li class="page_item page-item-5"><a href="' . get_permalink( 5 ) . '">Child 2</a> ' . $date . '</li>
    156     <li class="page_item page-item-6"><a href="' . get_permalink( 6 ) . '">Child 3</a> ' . $date . '</li>
    157 </ul>
    158 </li>
    159 <li class="page_item page-item-2 page_item_has_children"><a href="' . get_permalink( 2 ) . '">Parent 2</a> ' . $date . '
    160 <ul class=\'children\'>
    161     <li class="page_item page-item-7"><a href="' . get_permalink( 7 ) . '">Child 1</a> ' . $date . '</li>
    162     <li class="page_item page-item-8"><a href="' . get_permalink( 8 ) . '">Child 2</a> ' . $date . '</li>
    163     <li class="page_item page-item-9"><a href="' . get_permalink( 9 ) . '">Child 3</a> ' . $date . '</li>
    164 </ul>
    165 </li>
    166 <li class="page_item page-item-3 page_item_has_children"><a href="' . get_permalink( 3 ) . '">Parent 3</a> ' . $date . '
    167 <ul class=\'children\'>
    168     <li class="page_item page-item-10"><a href="' . get_permalink( 10 ) . '">Child 1</a> ' . $date . '</li>
    169     <li class="page_item page-item-11"><a href="' . get_permalink( 11 ) . '">Child 2</a> ' . $date . '</li>
    170     <li class="page_item page-item-12"><a href="' . get_permalink( 12 ) . '">Child 3</a> ' . $date . '</li>
    171 </ul>
    172 </li>
    173 </ul></li>';
    174         $actual                  = wp_list_pages( $args );
    175         $this->AssertEquals( $expected['date_format'], $actual );
     176        $date = date( $args['date_format'], self::$time );
     177
     178        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a> ' . $date . '
     179<ul class=\'children\'>
     180    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][0] ) . '">Child 1</a> ' . $date . '</li>
     181    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][1] ) . '">Child 2</a> ' . $date . '</li>
     182    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][2] ) . '">Child 3</a> ' . $date . '</li>
     183</ul>
     184</li>
     185<li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">Parent 2</a> ' . $date . '
     186<ul class=\'children\'>
     187    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][0] ) . '">Child 1</a> ' . $date . '</li>
     188    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][1] ) . '">Child 2</a> ' . $date . '</li>
     189    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][2] ) . '">Child 3</a> ' . $date . '</li>
     190</ul>
     191</li>
     192<li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a> ' . $date . '
     193<ul class=\'children\'>
     194    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][0] ) . '">Child 1</a> ' . $date . '</li>
     195    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][1] ) . '">Child 2</a> ' . $date . '</li>
     196    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][2] ) . '">Child 3</a> ' . $date . '</li>
     197</ul>
     198</li>
     199</ul></li>';
     200
     201        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    176202    }
    177203
    178204    function test_wp_list_pages_child_of() {
    179         $args                 = array(
     205        $args = array(
    180206            'echo'     => false,
    181             'child_of' => 2,
    182         );
    183         $expected['child_of'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-7"><a href="' . get_permalink( 7 ) . '">Child 1</a></li>
    184 <li class="page_item page-item-8"><a href="' . get_permalink( 8 ) . '">Child 2</a></li>
    185 <li class="page_item page-item-9"><a href="' . get_permalink( 9 ) . '">Child 3</a></li>
    186 </ul></li>';
    187         $actual               = wp_list_pages( $args );
    188         $this->AssertEquals( $expected['child_of'], $actual );
     207            'child_of' => self::$parent_2,
     208        );
     209
     210        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$children[ self::$parent_2 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][0] ) . '">Child 1</a></li>
     211<li class="page_item page-item-' . self::$children[ self::$parent_2 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][1] ) . '">Child 2</a></li>
     212<li class="page_item page-item-' . self::$children[ self::$parent_2 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][2] ) . '">Child 3</a></li>
     213</ul></li>';
     214
     215        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    189216    }
    190217
    191218    function test_wp_list_pages_exclude() {
    192         $args                = array(
     219        $args = array(
    193220            'echo'    => false,
    194             'exclude' => '2, 2',
    195         );
    196         $expected['exclude'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-1 page_item_has_children"><a href="' . get_permalink( 1 ) . '">Parent 1</a>
    197 <ul class=\'children\'>
    198     <li class="page_item page-item-4"><a href="' . get_permalink( 4 ) . '">Child 1</a></li>
    199     <li class="page_item page-item-5"><a href="' . get_permalink( 5 ) . '">Child 2</a></li>
    200     <li class="page_item page-item-6"><a href="' . get_permalink( 6 ) . '">Child 3</a></li>
    201 </ul>
    202 </li>
    203 <li class="page_item page-item-3 page_item_has_children"><a href="' . get_permalink( 3 ) . '">Parent 3</a>
    204 <ul class=\'children\'>
    205     <li class="page_item page-item-10"><a href="' . get_permalink( 10 ) . '">Child 1</a></li>
    206     <li class="page_item page-item-11"><a href="' . get_permalink( 11 ) . '">Child 2</a></li>
    207     <li class="page_item page-item-12"><a href="' . get_permalink( 12 ) . '">Child 3</a></li>
    208 </ul>
    209 </li>
    210 <li class="page_item page-item-7"><a href="' . get_permalink( 7 ) . '">Child 1</a></li>
    211 <li class="page_item page-item-8"><a href="' . get_permalink( 8 ) . '">Child 2</a></li>
    212 <li class="page_item page-item-9"><a href="' . get_permalink( 9 ) . '">Child 3</a></li>
    213 </ul></li>';
    214         $actual              = wp_list_pages( $args );
    215         $this->AssertEquals( $expected['exclude'], $actual );
     221            'exclude' => self::$parent_2,
     222        );
     223
     224        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a>
     225<ul class=\'children\'>
     226    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][0] ) . '">Child 1</a></li>
     227    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][1] ) . '">Child 2</a></li>
     228    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][2] ) . '">Child 3</a></li>
     229</ul>
     230</li>
     231<li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a>
     232<ul class=\'children\'>
     233    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][0] ) . '">Child 1</a></li>
     234    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][1] ) . '">Child 2</a></li>
     235    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][2] ) . '">Child 3</a></li>
     236</ul>
     237</li>
     238<li class="page_item page-item-' . self::$children[ self::$parent_2 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][0] ) . '">Child 1</a></li>
     239<li class="page_item page-item-' . self::$children[ self::$parent_2 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][1] ) . '">Child 2</a></li>
     240<li class="page_item page-item-' . self::$children[ self::$parent_2 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][2] ) . '">Child 3</a></li>
     241</ul></li>';
     242
     243        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    216244    }
    217245
    218246    function test_wp_list_pages_title_li() {
    219         $args                 = array(
     247        $args = array(
    220248            'echo'     => false,
    221249            'depth'    => 1,
    222250            'title_li' => 'PageTitle',
    223251        );
    224         $expected['title_li'] = '<li class="pagenav">PageTitle<ul><li class="page_item page-item-1 page_item_has_children"><a href="' . get_permalink( 1 ) . '">Parent 1</a></li>
    225 <li class="page_item page-item-2 page_item_has_children"><a href="' . get_permalink( 2 ) . '">Parent 2</a></li>
    226 <li class="page_item page-item-3 page_item_has_children"><a href="' . get_permalink( 3 ) . '">Parent 3</a></li>
    227 </ul></li>';
    228         $actual               = wp_list_pages( $args );
    229         $this->AssertEquals( $expected['title_li'], $actual );
     252
     253        $expected = '<li class="pagenav">PageTitle<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a></li>
     254<li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">Parent 2</a></li>
     255<li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a></li>
     256</ul></li>';
     257
     258        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    230259    }
    231260
    232261    function test_wp_list_pages_echo() {
    233         $args             = array(
     262        $args = array(
    234263            'echo'  => true,
    235264            'depth' => 1,
    236265        );
    237         $expected['echo'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-1 page_item_has_children"><a href="' . get_permalink( 1 ) . '">Parent 1</a></li>
    238 <li class="page_item page-item-2 page_item_has_children"><a href="' . get_permalink( 2 ) . '">Parent 2</a></li>
    239 <li class="page_item page-item-3 page_item_has_children"><a href="' . get_permalink( 3 ) . '">Parent 3</a></li>
    240 </ul></li>';
    241         $this->expectOutputString( $expected['echo'] );
     266
     267        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a></li>
     268<li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">Parent 2</a></li>
     269<li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a></li>
     270</ul></li>';
     271        $this->expectOutputString( $expected );
    242272        wp_list_pages( $args );
    243273    }
    244274
    245275    function test_wp_list_pages_authors() {
    246         $args                = array(
     276        $args = array(
    247277            'echo'    => false,
    248             'authors' => '2',
    249         );
    250         $expected['authors'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-3"><a href="' . get_permalink( 3 ) . '">Parent 3</a></li>
    251 </ul></li>';
    252         $actual              = wp_list_pages( $args );
    253         $this->AssertEquals( $expected['authors'], $actual );
     278            'authors' => self::$author,
     279        );
     280
     281        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_3 . '"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a></li>
     282</ul></li>';
     283
     284        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    254285    }
    255286
    256287    function test_wp_list_pages_number() {
    257         $args               = array(
     288        $args = array(
    258289            'echo'   => false,
    259290            'number' => 1,
    260291        );
    261         $expected['number'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-4"><a href="' . get_permalink( 4 ) . '">Child 1</a></li>
    262 </ul></li>';
    263         $actual             = wp_list_pages( $args );
    264         $this->AssertEquals( $expected['number'], $actual );
     292
     293        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$children[ self::$parent_1 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][0] ) . '">Child 1</a></li>
     294</ul></li>';
     295
     296        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    265297    }
    266298
    267299    function test_wp_list_pages_sort_column() {
    268         $args                    = array(
     300        $args = array(
    269301            'echo'        => false,
    270302            'sort_column' => 'post_author',
    271303            'sort_order'  => 'DESC',
    272304        );
    273         $expected['sort_column'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-3 page_item_has_children"><a href="' . get_permalink( 3 ) . '">Parent 3</a>
    274 <ul class=\'children\'>
    275     <li class="page_item page-item-10"><a href="' . get_permalink( 10 ) . '">Child 1</a></li>
    276     <li class="page_item page-item-11"><a href="' . get_permalink( 11 ) . '">Child 2</a></li>
    277     <li class="page_item page-item-12"><a href="' . get_permalink( 12 ) . '">Child 3</a></li>
    278 </ul>
    279 </li>
    280 <li class="page_item page-item-1 page_item_has_children"><a href="' . get_permalink( 1 ) . '">Parent 1</a>
    281 <ul class=\'children\'>
    282     <li class="page_item page-item-4"><a href="' . get_permalink( 4 ) . '">Child 1</a></li>
    283     <li class="page_item page-item-5"><a href="' . get_permalink( 5 ) . '">Child 2</a></li>
    284     <li class="page_item page-item-6"><a href="' . get_permalink( 6 ) . '">Child 3</a></li>
    285 </ul>
    286 </li>
    287 <li class="page_item page-item-2 page_item_has_children"><a href="' . get_permalink( 2 ) . '">Parent 2</a>
    288 <ul class=\'children\'>
    289     <li class="page_item page-item-7"><a href="' . get_permalink( 7 ) . '">Child 1</a></li>
    290     <li class="page_item page-item-8"><a href="' . get_permalink( 8 ) . '">Child 2</a></li>
    291     <li class="page_item page-item-9"><a href="' . get_permalink( 9 ) . '">Child 3</a></li>
    292 </ul>
    293 </li>
    294 </ul></li>';
    295         $actual                  = wp_list_pages( $args );
    296         $this->AssertEquals( $expected['sort_column'], $actual );
     305
     306        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a>
     307<ul class=\'children\'>
     308    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][0] ) . '">Child 1</a></li>
     309    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][1] ) . '">Child 2</a></li>
     310    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][2] ) . '">Child 3</a></li>
     311</ul>
     312</li>
     313<li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a>
     314<ul class=\'children\'>
     315    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][0] ) . '">Child 1</a></li>
     316    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][1] ) . '">Child 2</a></li>
     317    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][2] ) . '">Child 3</a></li>
     318</ul>
     319</li>
     320<li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">Parent 2</a>
     321<ul class=\'children\'>
     322    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][0] ) . '">Child 1</a></li>
     323    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][1] ) . '">Child 2</a></li>
     324    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][2] ) . '">Child 3</a></li>
     325</ul>
     326</li>
     327</ul></li>';
     328
     329        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    297330    }
    298331
    299332    function test_wp_list_pages_link_before() {
    300         $args                    = array(
     333        $args = array(
    301334            'echo'        => false,
    302335            'link_before' => 'BEFORE',
    303336        );
    304         $expected['link_before'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-1 page_item_has_children"><a href="' . get_permalink( 1 ) . '">BEFOREParent 1</a>
    305 <ul class=\'children\'>
    306     <li class="page_item page-item-4"><a href="' . get_permalink( 4 ) . '">BEFOREChild 1</a></li>
    307     <li class="page_item page-item-5"><a href="' . get_permalink( 5 ) . '">BEFOREChild 2</a></li>
    308     <li class="page_item page-item-6"><a href="' . get_permalink( 6 ) . '">BEFOREChild 3</a></li>
    309 </ul>
    310 </li>
    311 <li class="page_item page-item-2 page_item_has_children"><a href="' . get_permalink( 2 ) . '">BEFOREParent 2</a>
    312 <ul class=\'children\'>
    313     <li class="page_item page-item-7"><a href="' . get_permalink( 7 ) . '">BEFOREChild 1</a></li>
    314     <li class="page_item page-item-8"><a href="' . get_permalink( 8 ) . '">BEFOREChild 2</a></li>
    315     <li class="page_item page-item-9"><a href="' . get_permalink( 9 ) . '">BEFOREChild 3</a></li>
    316 </ul>
    317 </li>
    318 <li class="page_item page-item-3 page_item_has_children"><a href="' . get_permalink( 3 ) . '">BEFOREParent 3</a>
    319 <ul class=\'children\'>
    320     <li class="page_item page-item-10"><a href="' . get_permalink( 10 ) . '">BEFOREChild 1</a></li>
    321     <li class="page_item page-item-11"><a href="' . get_permalink( 11 ) . '">BEFOREChild 2</a></li>
    322     <li class="page_item page-item-12"><a href="' . get_permalink( 12 ) . '">BEFOREChild 3</a></li>
    323 </ul>
    324 </li>
    325 </ul></li>';
    326         $actual                  = wp_list_pages( $args );
    327         $this->AssertEquals( $expected['link_before'], $actual );
     337
     338        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">BEFOREParent 1</a>
     339<ul class=\'children\'>
     340    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][0] ) . '">BEFOREChild 1</a></li>
     341    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][1] ) . '">BEFOREChild 2</a></li>
     342    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][2] ) . '">BEFOREChild 3</a></li>
     343</ul>
     344</li>
     345<li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">BEFOREParent 2</a>
     346<ul class=\'children\'>
     347    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][0] ) . '">BEFOREChild 1</a></li>
     348    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][1] ) . '">BEFOREChild 2</a></li>
     349    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][2] ) . '">BEFOREChild 3</a></li>
     350</ul>
     351</li>
     352<li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">BEFOREParent 3</a>
     353<ul class=\'children\'>
     354    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][0] ) . '">BEFOREChild 1</a></li>
     355    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][1] ) . '">BEFOREChild 2</a></li>
     356    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][2] ) . '">BEFOREChild 3</a></li>
     357</ul>
     358</li>
     359</ul></li>';
     360
     361        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    328362    }
    329363
    330364    function test_wp_list_pages_link_after() {
    331         $args                   = array(
     365        $args = array(
    332366            'echo'       => false,
    333367            'link_after' => 'AFTER',
    334368        );
    335         $expected['link_after'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-1 page_item_has_children"><a href="' . get_permalink( 1 ) . '">Parent 1AFTER</a>
    336 <ul class=\'children\'>
    337     <li class="page_item page-item-4"><a href="' . get_permalink( 4 ) . '">Child 1AFTER</a></li>
    338     <li class="page_item page-item-5"><a href="' . get_permalink( 5 ) . '">Child 2AFTER</a></li>
    339     <li class="page_item page-item-6"><a href="' . get_permalink( 6 ) . '">Child 3AFTER</a></li>
    340 </ul>
    341 </li>
    342 <li class="page_item page-item-2 page_item_has_children"><a href="' . get_permalink( 2 ) . '">Parent 2AFTER</a>
    343 <ul class=\'children\'>
    344     <li class="page_item page-item-7"><a href="' . get_permalink( 7 ) . '">Child 1AFTER</a></li>
    345     <li class="page_item page-item-8"><a href="' . get_permalink( 8 ) . '">Child 2AFTER</a></li>
    346     <li class="page_item page-item-9"><a href="' . get_permalink( 9 ) . '">Child 3AFTER</a></li>
    347 </ul>
    348 </li>
    349 <li class="page_item page-item-3 page_item_has_children"><a href="' . get_permalink( 3 ) . '">Parent 3AFTER</a>
    350 <ul class=\'children\'>
    351     <li class="page_item page-item-10"><a href="' . get_permalink( 10 ) . '">Child 1AFTER</a></li>
    352     <li class="page_item page-item-11"><a href="' . get_permalink( 11 ) . '">Child 2AFTER</a></li>
    353     <li class="page_item page-item-12"><a href="' . get_permalink( 12 ) . '">Child 3AFTER</a></li>
    354 </ul>
    355 </li>
    356 </ul></li>';
    357         $actual                 = wp_list_pages( $args );
    358         $this->AssertEquals( $expected['link_after'], $actual );
     369
     370        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1AFTER</a>
     371<ul class=\'children\'>
     372    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][0] ) . '">Child 1AFTER</a></li>
     373    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][1] ) . '">Child 2AFTER</a></li>
     374    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][2] ) . '">Child 3AFTER</a></li>
     375</ul>
     376</li>
     377<li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">Parent 2AFTER</a>
     378<ul class=\'children\'>
     379    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][0] ) . '">Child 1AFTER</a></li>
     380    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][1] ) . '">Child 2AFTER</a></li>
     381    <li class="page_item page-item-' . self::$children[ self::$parent_2 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][2] ) . '">Child 3AFTER</a></li>
     382</ul>
     383</li>
     384<li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3AFTER</a>
     385<ul class=\'children\'>
     386    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][0] ) . '">Child 1AFTER</a></li>
     387    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][1] ) . '">Child 2AFTER</a></li>
     388    <li class="page_item page-item-' . self::$children[ self::$parent_3 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][2] ) . '">Child 3AFTER</a></li>
     389</ul>
     390</li>
     391</ul></li>';
     392
     393        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    359394    }
    360395
    361396
    362397    function test_wp_list_pages_include() {
    363         $args                = array(
     398        $args = array(
    364399            'echo'    => false,
    365             'include' => '1,3',
    366         );
    367         $expected['include'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-1"><a href="' . get_permalink( 1 ) . '">Parent 1</a></li>
    368 <li class="page_item page-item-3"><a href="' . get_permalink( 3 ) . '">Parent 3</a></li>
    369 </ul></li>';
    370         $actual              = wp_list_pages( $args );
    371         $this->AssertEquals( $expected['include'], $actual );
     400            'include' => self::$parent_1 . ',' . self::$parent_3,
     401        );
     402
     403        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . '"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a></li>
     404<li class="page_item page-item-' . self::$parent_3 . '"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a></li>
     405</ul></li>';
     406
     407        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    372408    }
    373409
    374410    function test_wp_list_pages_exclude_tree() {
    375         $args                = array(
     411        $args = array(
    376412            'echo'         => false,
    377             'exclude_tree' => '2, 3',
    378         );
    379         $expected['exclude'] = '<li class="pagenav">Pages<ul><li class="page_item page-item-1 page_item_has_children"><a href="' . get_permalink( 1 ) . '">Parent 1</a>
    380 <ul class=\'children\'>
    381     <li class="page_item page-item-4"><a href="' . get_permalink( 4 ) . '">Child 1</a></li>
    382     <li class="page_item page-item-5"><a href="' . get_permalink( 5 ) . '">Child 2</a></li>
    383     <li class="page_item page-item-6"><a href="' . get_permalink( 6 ) . '">Child 3</a></li>
    384 </ul>
    385 </li>
    386 </ul></li>';
    387         $actual              = wp_list_pages( $args );
    388         $this->AssertEquals( $expected['exclude'], $actual );
     413            'exclude_tree' => self::$parent_2 . ',' . self::$parent_3,
     414        );
     415
     416        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a>
     417<ul class=\'children\'>
     418    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][0] ) . '">Child 1</a></li>
     419    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][1] ) . '">Child 2</a></li>
     420    <li class="page_item page-item-' . self::$children[ self::$parent_1 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][2] ) . '">Child 3</a></li>
     421</ul>
     422</li>
     423</ul></li>';
     424
     425        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    389426    }
    390427
    391428    function test_wp_list_pages_discarded_whitespace() {
    392         $args                = array(
     429        $args = array(
    393430            'echo'         => false,
    394431            'item_spacing' => 'discard',
    395432        );
    396         $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>';
    397         $actual              = wp_list_pages( $args );
    398         $this->AssertEquals( $expected['default'], $actual );
     433
     434        $expected = '<li class="pagenav">Pages<ul><li class="page_item page-item-' . self::$parent_1 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_1 ) . '">Parent 1</a><ul class=\'children\'><li class="page_item page-item-' . self::$children[ self::$parent_1 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][0] ) . '">Child 1</a></li><li class="page_item page-item-' . self::$children[ self::$parent_1 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][1] ) . '">Child 2</a></li><li class="page_item page-item-' . self::$children[ self::$parent_1 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_1 ][2] ) . '">Child 3</a></li></ul></li><li class="page_item page-item-' . self::$parent_2 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_2 ) . '">Parent 2</a><ul class=\'children\'><li class="page_item page-item-' . self::$children[ self::$parent_2 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][0] ) . '">Child 1</a></li><li class="page_item page-item-' . self::$children[ self::$parent_2 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][1] ) . '">Child 2</a></li><li class="page_item page-item-' . self::$children[ self::$parent_2 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_2 ][2] ) . '">Child 3</a></li></ul></li><li class="page_item page-item-' . self::$parent_3 . ' page_item_has_children"><a href="' . get_permalink( self::$parent_3 ) . '">Parent 3</a><ul class=\'children\'><li class="page_item page-item-' . self::$children[ self::$parent_3 ][0] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][0] ) . '">Child 1</a></li><li class="page_item page-item-' . self::$children[ self::$parent_3 ][1] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][1] ) . '">Child 2</a></li><li class="page_item page-item-' . self::$children[ self::$parent_3 ][2] . '"><a href="' . get_permalink( self::$children[ self::$parent_3 ][2] ) . '">Child 3</a></li></ul></li></ul></li>';
     435
     436        $this->AssertEquals( $expected, wp_list_pages( $args ) );
    399437    }
    400438}
Note: See TracChangeset for help on using the changeset viewer.