Changeset 37404
- Timestamp:
- 05/09/2016 07:16:35 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/ajax/DeleteComment.php
r35311 r37404 22 22 protected static $comments = array(); 23 23 24 protected static $admin_id = 0; 25 protected static $editor_id = 0; 26 protected static $post; 24 /** 25 * ID of a post. 26 * @var int 27 */ 27 28 protected static $post_id; 28 protected static $user_ids = array();29 29 30 30 public static function wpSetUpBeforeClass( $factory ) { 31 self::$user_ids[] = self::$admin_id = $factory->user->create( array( 'role' => 'administrator' ) );32 self::$user_ids[] = self::$editor_id = $factory->user->create( array( 'role' => 'editor' ) );33 34 31 self::$post_id = $factory->post->create(); 35 self::$post = get_post( self::$post_id );36 32 37 33 $comment_ids = $factory->comment->create_post_comments( self::$post_id, 8 ); … … 40 36 41 37 public static function wpTearDownAfterClass() { 42 foreach ( self::$user_ids as $user_id ) {43 self::delete_user( $user_id );44 }45 46 38 wp_delete_post( self::$post_id, true ); 47 39
Note: See TracChangeset
for help on using the changeset viewer.