Backend\Core\Engine\Authentication::tearDown PHP Method

tearDown() public static method

Reset our class to make sure no contamination from previous authentications persists. This signifies a deeper issue with this class. Solving the issue would be preferable to introducting another method. This currently only exists to serve the test.
public static tearDown ( )
    public static function tearDown()
    {
        self::$allowedActions = array();
        self::$allowedModules = array();
        self::$user = null;
    }

Usage Example

Beispiel #1
0
 /**
  * The authentication class persist the previous user.
  * In practice this situation will almost never occur:
  * Login with one user, log out and subsequently log in
  * with another user without a page reload to reinitialize
  * the application.
  * If the clients could be insulated from eachother, this
  * would not be an issue.
  */
 protected function tearDown()
 {
     Authentication::tearDown();
 }