I am doing some functional tests for a backend plugin of magento. At the moment the browser profile is cleaned up between each test method (of my PHPUnit test) – so login is gone away between each test method.
It would be nice if i can do the login on a once-per-class basis to increase performance, but how to do that? How to keep the cookie in the browser and how to remove it after test class?
I haven’t used Magento so my answer is more general. Can you supply a mock authentication object for the tests not directly related to it? Create a custom implementation to return
trueto every call toisAuthenticated()(or whatever the method is named).