Changeset 49603 for trunk/tests/phpunit/tests/post/wpListPages.php
- Timestamp:
- 11/15/2020 01:59:32 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/wpListPages.php
r49327 r49603 54 54 public static $time; 55 55 56 public static function wpSet upBeforeClass() {56 public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { 57 57 self::$time = time(); 58 58 59 59 $post_date = gmdate( 'Y-m-d H:i:s', self::$time ); 60 60 61 self::$editor = self::factory()->user->create( array( 'role' => 'editor' ) );62 self::$author = self::factory()->user->create( array( 'role' => 'author' ) );63 64 self::$parent_1 = self::factory()->post->create(61 self::$editor = $factory->user->create( array( 'role' => 'editor' ) ); 62 self::$author = $factory->user->create( array( 'role' => 'author' ) ); 63 64 self::$parent_1 = $factory->post->create( 65 65 array( 66 66 'post_author' => self::$editor, … … 71 71 ); 72 72 73 self::$parent_2 = self::factory()->post->create(73 self::$parent_2 = $factory->post->create( 74 74 array( 75 75 'post_type' => 'page', … … 79 79 ); 80 80 81 self::$parent_3 = self::factory()->post->create(81 self::$parent_3 = $factory->post->create( 82 82 array( 83 83 'post_author' => self::$author, … … 89 89 90 90 foreach ( array( self::$parent_1, self::$parent_2, self::$parent_3 ) as $page ) { 91 self::$children[ $page ][] = self::factory()->post->create(91 self::$children[ $page ][] = $factory->post->create( 92 92 array( 93 93 'post_parent' => $page, … … 97 97 ) 98 98 ); 99 self::$children[ $page ][] = self::factory()->post->create(99 self::$children[ $page ][] = $factory->post->create( 100 100 array( 101 101 'post_parent' => $page, … … 105 105 ) 106 106 ); 107 self::$children[ $page ][] = self::factory()->post->create(107 self::$children[ $page ][] = $factory->post->create( 108 108 array( 109 109 'post_parent' => $page,
Note: See TracChangeset
for help on using the changeset viewer.