You appear to be a bot. Output may be restricted
Description
Post
Usage
Tests_Ajax_Autosave::wpSetUpBeforeClass( $factory );
Parameters
- $factory
- ( mixed ) required –
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/ajax/Autosave.php
Lines:
1 to 13 of 13
public static function wpSetUpBeforeClass( WP_UnitTest_Factory $factory ) { self::$admin_id = $factory->user->create( array( 'role' => 'administrator' ) ); self::$user_ids[] = self::$admin_id; self::$editor_id = $factory->user->create( array( 'role' => 'editor' ) ); self::$user_ids[] = self::$editor_id; // Set a user so the $post has 'post_author'. wp_set_current_user( self::$admin_id ); self::$post_id = $factory->post->create( array( 'post_status' => 'draft' ) ); self::$post = get_post( self::$post_id ); }