Codeception / module-phpbrowser

PhpBrowser module for Codeception
MIT License
60 stars 14 forks source link

PhpBrowser _closeSession doesn't close session. #9

Open Naktibalda opened 8 years ago

Naktibalda commented 8 years ago

https://github.com/Codeception/Codeception/blob/2.2.2/src/Codeception/Module/PhpBrowser.php#L279

    public function _closeSession($session)
    {
        unset($session);
    }

All _closeSession does is unsetting a local variable. To achieve desired effect, $session would have to be passed by reference and value overwritten instead of unsetting.

The only place where this method is called is https://github.com/Codeception/Codeception/blob/2.2.2/src/Codeception/Lib/Friend.php#L70

Update: _backupSession is fine.