I have some logic in my code that’s based on whether or not the user is logged in. How do I test it from my WP_UnitTestCase?

1
Call wp_set_current_user($id) to make a user ID the currently logged in user.