You are here

protected function CommerceCheckoutLoginTestBase::ensureUserIsAnonymous in Commerce Checkout Login 7.2

1 call to CommerceCheckoutLoginTestBase::ensureUserIsAnonymous()
CommerceCheckoutLoginTestBase::prepareAnonymousEnvironment in tests/CommerceCheckoutLoginTestBase.test
Helper function to prepare an anonymous enviroment, it sets the user, products and prepares a cart.

File

tests/CommerceCheckoutLoginTestBase.test, line 73
Contains the test class for Commerce checkout login module tests.

Class

CommerceCheckoutLoginTestBase
Class for commerce checkout login testing.

Code

protected function ensureUserIsAnonymous() {
  global $user;
  $this
    ->drupalLogout();
  $user = user_load(0);
}