WordPress.org

Make WordPress Core

Changeset 37404


Ignore:
Timestamp:
05/09/2016 07:16:35 PM (4 years ago)
Author:
ocean90
Message:

Tests: Don't create unused users in Tests_Ajax_DeleteComment.

Fixes #36616.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/ajax/DeleteComment.php

    r35311 r37404  
    2222    protected static $comments = array();
    2323
    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     */
    2728    protected static $post_id;
    28     protected static $user_ids = array();
    2929
    3030    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 
    3431        self::$post_id = $factory->post->create();
    35         self::$post = get_post( self::$post_id );
    3632
    3733        $comment_ids = $factory->comment->create_post_comments( self::$post_id, 8 );
     
    4036
    4137    public static function wpTearDownAfterClass() {
    42         foreach ( self::$user_ids as $user_id ) {
    43             self::delete_user( $user_id );
    44         }
    45 
    4638        wp_delete_post( self::$post_id, true );
    4739
Note: See TracChangeset for help on using the changeset viewer.