Codeception/Codeception — pull request #1486 by FnTm (2014-10-24 12:39:29+00:00)
Title: Close any open ZF2 sessions

Since the ZF2 re-instantiates the application for each test, each module is also re-instantiated.

If the session config is being changed in the modules bootstrap file, then php will try to do it again. If a session is open for a retry, then an Error will be thrown ` [PHPUnit_Framework_ExceptionWrapper] Invalid save handler specified: ini_set(): A session is active. You cannot change the session module's ini settings at this time `

Therefore we close any open sessions. Since we are already clearing the Sessions data above, this should not impact any uses cases.