diff options
author | Joas Schilling <coding@schilljs.com> | 2018-01-24 17:23:59 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-01-24 17:23:59 +0100 |
commit | c3424df1f026854ed8adbfdf8d96da7a6562a8dd (patch) | |
tree | 3147bb402fe417804aac8c278e43d60a5d806f85 /tests/startsessionlistener.php | |
parent | 5520ba3d15b088e9151ffef89f7cd389c470563b (diff) | |
download | nextcloud-server-c3424df1f026854ed8adbfdf8d96da7a6562a8dd.tar.gz nextcloud-server-c3424df1f026854ed8adbfdf8d96da7a6562a8dd.zip |
Require PHPUnit 6.5 or higher
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/startsessionlistener.php')
-rw-r--r-- | tests/startsessionlistener.php | 40 |
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) { - } - } |