Test_Import::wpSetUpBeforeClass( $factory )


Source

File: tests/test-import.php

	public static function wpSetUpBeforeClass( $factory ) {

		// This code will run once before all tests

		$user_id = $factory->user->create( array( 'role' => 'administrator' ) );
		$user = wp_set_current_user( $user_id );

		// Fake admin visit
		set_current_screen( 'edit-post' );
		
	}