Changeset 31848
- Timestamp:
- 03/20/2015 12:34:28 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/feed/rss2.php
r31846 r31848 12 12 private $permalink_structure = ''; 13 13 14 static $user; 15 static $posts; 16 17 public static function setUpBeforeClass() { 18 $factory = new WP_UnitTest_Factory(); 19 20 self::$user = $factory->user->create(); 21 self::$posts = $factory->post->create_many( 25, array( 22 'post_author' => self::$user, 23 ) ); 24 25 self::commit_transaction(); 26 } 27 28 public static function tearDownAfterClass() { 29 if ( is_multisite() ) { 30 wpmu_delete_user( self::$user ); 31 } else { 32 wp_delete_user( self::$user ); 33 } 34 35 foreach ( self::$posts as $post ) { 36 wp_delete_post( $post, true ); 37 } 38 39 self::commit_transaction(); 40 } 41 14 42 public function setUp() { 15 43 global $wp_rewrite; … … 19 47 20 48 parent::setUp(); 21 22 $u = $this->factory->user->create();23 $this->factory->post->create_many( 25, array(24 'post_author' => $u,25 ) );26 49 27 50 $this->post_count = get_option('posts_per_rss');
Note: See TracChangeset
for help on using the changeset viewer.