Ticket #36616: 36616.patch
| File 36616.patch, 1.2 KB (added by , 10 years ago) |
|---|
-
tests/phpunit/tests/ajax/DeleteComment.php
21 21 */ 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 ); 38 34 self::$comments = array_map( 'get_comment', $comment_ids ); 39 35 } 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 48 40 foreach ( self::$comments as $c ) {
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)