$this->data = array();
}
+ /**
+ * Helper function for PHPUnit execution - don't use in non-test code
+ */
+ public function reopen() {
+ $this->sessionClosed = false;
+ }
+
/**
* In case the session has already been locked an exception will be thrown
*
}
public function endTest(PHPUnit_Framework_Test $test, $time) {
- // new session
- \OC::$session = new \OC\Session\Memory('');
-
- // load the version
- OC_Util::getVersion();
+ // reopen the session - only allowed for memory session
+ if (\OC::$session instanceof \OC\Session\Memory) {
+ /** @var $session \OC\Session\Memory */
+ $session = \OC::$session;
+ $session->reopen();
+ }
}
public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {