summaryrefslogtreecommitdiffstats
path: root/tests/lib/TestCase.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-01-24 17:23:59 +0100
committerJoas Schilling <coding@schilljs.com>2018-01-24 17:23:59 +0100
commitc3424df1f026854ed8adbfdf8d96da7a6562a8dd (patch)
tree3147bb402fe417804aac8c278e43d60a5d806f85 /tests/lib/TestCase.php
parent5520ba3d15b088e9151ffef89f7cd389c470563b (diff)
downloadnextcloud-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/lib/TestCase.php')
-rw-r--r--tests/lib/TestCase.php24
1 files changed, 3 insertions, 21 deletions
diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php
index 345b2a68e6f..92076580510 100644
--- a/tests/lib/TestCase.php
+++ b/tests/lib/TestCase.php
@@ -33,7 +33,7 @@ use OCP\IDBConnection;
use OCP\IL10N;
use OCP\Security\ISecureRandom;
-abstract class TestCase extends \PHPUnit_Framework_TestCase {
+abstract class TestCase extends \PHPUnit\Framework\TestCase {
/** @var \OC\Command\QueueBus */
private $commandBus;
@@ -47,24 +47,6 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
protected $services = [];
/**
- * Wrapper to be forward compatible to phpunit 5.4+
- *
- * @param string $originalClassName
- * @return \PHPUnit_Framework_MockObject_MockObject
- */
- protected function createMock($originalClassName) {
- if (is_callable('parent::createMock')) {
- return parent::createMock($originalClassName);
- }
-
- return $this->getMockBuilder($originalClassName)
- ->disableOriginalConstructor()
- ->disableOriginalClone()
- ->disableArgumentCloning()
- ->getMock();
- }
-
- /**
* @param string $name
* @param mixed $newService
* @return bool
@@ -152,7 +134,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
}
}
- protected function onNotSuccessfulTest($e) {
+ protected function onNotSuccessfulTest(\Throwable $t) {
$this->restoreAllServices();
// restore database connection
@@ -162,7 +144,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase {
});
}
- parent::onNotSuccessfulTest($e);
+ parent::onNotSuccessfulTest($t);
}
protected function tearDown() {