Changeset 35186 for trunk/tests/phpunit/tests/query/stickies.php
- Timestamp:
- 10/15/2015 04:43:37 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/stickies.php
r31439 r35186 9 9 static $posts = array(); 10 10 11 public static function setUpBeforeClass() { 12 $f = new WP_UnitTest_Factory(); 13 11 public static function wpSetUpBeforeClass( $factory ) { 14 12 // Set post times to get a reliable order. 15 13 $now = time(); 16 14 for ( $i = 0; $i <= 22; $i++ ) { 17 15 $post_date = date( 'Y-m-d H:i:s', $now - ( 10 * $i ) ); 18 self::$posts[ $i ] = $f ->post->create( array(16 self::$posts[ $i ] = $factory->post->create( array( 19 17 'post_date' => $post_date, 20 18 ) ); … … 24 22 stick_post( self::$posts[14] ); 25 23 stick_post( self::$posts[8] ); 26 27 self::commit_transaction();28 24 } 29 25 30 public static function tearDownAfterClass() {26 public static function wpTearDownAfterClass() { 31 27 foreach ( self::$posts as $p ) { 32 28 wp_delete_post( $p, true ); 33 29 } 34 35 self::commit_transaction();36 30 } 37 31
Note: See TracChangeset
for help on using the changeset viewer.