2014-03-13 19:19:17 +04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Copyright (c) 2014 Thomas Müller <deepdiver@owncloud.com>
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Starts a new session before each test execution
|
|
|
|
*/
|
|
|
|
class StartSessionListener implements PHPUnit_Framework_TestListener {
|
|
|
|
|
|
|
|
public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
|
|
|
|
}
|
|
|
|
|
2014-04-24 17:16:57 +04:00
|
|
|
public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
|
|
|
|
}
|
|
|
|
|
2014-03-13 19:19:17 +04:00
|
|
|
public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public function startTest(PHPUnit_Framework_Test $test) {
|
2014-03-14 21:16:20 +04:00
|
|
|
}
|
2014-03-13 19:19:17 +04:00
|
|
|
|
2014-03-14 21:16:20 +04:00
|
|
|
public function endTest(PHPUnit_Framework_Test $test, $time) {
|
2014-03-18 00:57:10 +04:00
|
|
|
// reopen the session - only allowed for memory session
|
2014-07-16 21:40:22 +04:00
|
|
|
if (\OC::$server->getSession() instanceof \OC\Session\Memory) {
|
2014-03-18 00:57:10 +04:00
|
|
|
/** @var $session \OC\Session\Memory */
|
2014-07-16 21:40:22 +04:00
|
|
|
$session = \OC::$server->getSession();
|
2014-03-18 00:57:10 +04:00
|
|
|
$session->reopen();
|
|
|
|
}
|
2014-03-13 19:19:17 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
|
|
|
|
}
|
|
|
|
|
2015-12-10 11:22:41 +03:00
|
|
|
public function addWarning(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_Warning $e, $time) {
|
|
|
|
}
|
|
|
|
|
2014-03-13 19:19:17 +04:00
|
|
|
}
|