Changeset 35186 for trunk/tests/phpunit/tests/query/date.php
- Timestamp:
- 10/15/2015 04:43:37 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/date.php
r30276 r35186 13 13 static $post_ids = array(); 14 14 15 public static function setUpBeforeClass() {15 public static function wpSetUpBeforeClass( $factory ) { 16 16 // Be careful modifying this. Tests are coded to expect this exact sample data. 17 17 $post_dates = array( … … 41 41 ); 42 42 43 $factory = new WP_UnitTest_Factory;44 45 43 foreach ( $post_dates as $post_date ) { 46 44 self::$post_ids[] = $factory->post->create( array( 'post_date' => $post_date ) ); 47 45 } 48 49 self::commit_transaction(); 50 } 51 52 public static function tearDownAfterClass() { 46 } 47 48 public static function wpTearDownAfterClass() { 53 49 foreach ( self::$post_ids as $post_id ) { 54 50 wp_delete_post( $post_id, true ); 55 51 } 56 57 self::commit_transaction();58 52 } 59 53
Note: See TracChangeset
for help on using the changeset viewer.