summaryrefslogtreecommitdiffstats
path: root/tests/startsessionlistener.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/startsessionlistener.php')
-rw-r--r--tests/startsessionlistener.php40
1 files changed, 10 insertions, 30 deletions
diff --git a/tests/startsessionlistener.php b/tests/startsessionlistener.php
index 88544cc6ce9..24a72db0065 100644
--- a/tests/startsessionlistener.php
+++ b/tests/startsessionlistener.php
@@ -6,45 +6,25 @@
* See the COPYING-README file.
*/
+use OC\Session\Memory;
+use PHPUnit\Framework\Test;
+use PHPUnit\Framework\TestListener;
+use PHPUnit\Framework\TestListenerDefaultImplementation;
+
/**
* 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) {
- }
-
- public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
- }
+class StartSessionListener implements TestListener {
- public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) {
- }
-
- public function startTest(PHPUnit_Framework_Test $test) {
- }
+ use TestListenerDefaultImplementation;
- public function endTest(PHPUnit_Framework_Test $test, $time) {
+ public function endTest(Test $test, $time) {
// reopen the session - only allowed for memory session
- if (\OC::$server->getSession() instanceof \OC\Session\Memory) {
- /** @var $session \OC\Session\Memory */
+ if (\OC::$server->getSession() instanceof Memory) {
+ /** @var $session Memory */
$session = \OC::$server->getSession();
$session->reopen();
}
}
- public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {
- }
-
- public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {
- }
-
- public function addWarning(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_Warning $e, $time) {
- }
-
}