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?
Leave a Reply
You must be logged in to post a comment.
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?
You must be logged in to post a comment.
Call wp_set_current_user($id) to make a user ID the currently logged in user.