On Tue, Jul 12, 2016 at 11:01 AM, Daniel Barrett danb@cimpress.com wrote:
What is the proper incantation for faking a successful login (for a given user) as part of a unit test? My old code was:
$context = RequestContext::getMain(); $specialPage = new LoginForm( $context->getRequest() ); $user->logout(); $specialPage->showReturnToPage('successredirect'); $specialPage->successfulLogin();
What is the right way to perform this task with AuthManager?
What is the task exactly? Just outputting a "login successful" page without actually logging the user in? I guess the equivalent would be to call SpecialUserLogin::successfulAction() (using TestingAccessWrapper).