summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/tests
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-21 16:40:38 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 13:34:41 +0100
commitc007ca624f4a95e1a491221d425fcb2fa6e5589a (patch)
treeb60aa133b438eb116ac3579283aa8a7967efd12b /apps/federatedfilesharing/tests
parente0f32814e33f9ebb8c42744611048cbfac1eb588 (diff)
downloadnextcloud-server-c007ca624f4a95e1a491221d425fcb2fa6e5589a.tar.gz
nextcloud-server-c007ca624f4a95e1a491221d425fcb2fa6e5589a.zip
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/federatedfilesharing/tests')
-rw-r--r--apps/federatedfilesharing/tests/AddressHandlerTest.php2
-rw-r--r--apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php2
-rw-r--r--apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php2
-rw-r--r--apps/federatedfilesharing/tests/FederatedShareProviderTest.php6
-rw-r--r--apps/federatedfilesharing/tests/NotificationsTest.php2
-rw-r--r--apps/federatedfilesharing/tests/Settings/AdminTest.php2
-rw-r--r--apps/federatedfilesharing/tests/TestCase.php6
-rw-r--r--apps/federatedfilesharing/tests/TokenHandlerTest.php2
8 files changed, 12 insertions, 12 deletions
diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php
index 63691f61624..efea34dbab2 100644
--- a/apps/federatedfilesharing/tests/AddressHandlerTest.php
+++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php
@@ -46,7 +46,7 @@ class AddressHandlerTest extends \Test\TestCase {
/** @var CloudIdManager */
private $cloudIdManager;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)
diff --git a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php
index db4c3914115..88f486f3c69 100644
--- a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php
@@ -84,7 +84,7 @@ class MountPublicLinkControllerTest extends \Test\TestCase {
/** @var ICloudIdManager */
private $cloudIdManager;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->request = $this->getMockBuilder(IRequest::class)->disableOriginalConstructor()->getMock();
diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
index 57d82f63e16..d8903d438fb 100644
--- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
+++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php
@@ -112,7 +112,7 @@ class RequestHandlerControllerTest extends \Test\TestCase {
/** @var ICloudFederationShare|\PHPUnit_Framework_MockObject_MockObject */
private $cloudFederationShare;
- protected function setUp() {
+ protected function setUp(): void {
$this->share = $this->getMockBuilder(IShare::class)->getMock();
$this->federatedShareProvider = $this->getMockBuilder('OCA\FederatedFileSharing\FederatedShareProvider')
diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
index ae233e565d1..31d13df8f31 100644
--- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
+++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php
@@ -85,7 +85,7 @@ class FederatedShareProviderTest extends \Test\TestCase {
/** @var \PHPUnit_Framework_MockObject_MockObject|ICloudFederationProviderManager */
private $cloudFederationProviderManager;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
@@ -131,10 +131,10 @@ class FederatedShareProviderTest extends \Test\TestCase {
$this->shareManager = \OC::$server->getShareManager();
}
- public function tearDown() {
+ public function tearDown(): void {
$this->connection->getQueryBuilder()->delete('share')->execute();
- return parent::tearDown();
+ parent::tearDown();
}
public function testCreate() {
diff --git a/apps/federatedfilesharing/tests/NotificationsTest.php b/apps/federatedfilesharing/tests/NotificationsTest.php
index d93b9d608c3..769184f1628 100644
--- a/apps/federatedfilesharing/tests/NotificationsTest.php
+++ b/apps/federatedfilesharing/tests/NotificationsTest.php
@@ -53,7 +53,7 @@ class NotificationsTest extends \Test\TestCase {
/** @var ICloudFederationFactory|\PHPUnit_Framework_MockObject_MockObject */
private $cloudFederationFactory;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->jobList = $this->getMockBuilder('OCP\BackgroundJob\IJobList')->getMock();
diff --git a/apps/federatedfilesharing/tests/Settings/AdminTest.php b/apps/federatedfilesharing/tests/Settings/AdminTest.php
index f0cf3b77d38..bca8ad73426 100644
--- a/apps/federatedfilesharing/tests/Settings/AdminTest.php
+++ b/apps/federatedfilesharing/tests/Settings/AdminTest.php
@@ -38,7 +38,7 @@ class AdminTest extends TestCase {
/** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
private $gsConfig;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->federatedShareProvider = $this->createMock(FederatedShareProvider::class);
$this->gsConfig = $this->createMock(IConfig::class);
diff --git a/apps/federatedfilesharing/tests/TestCase.php b/apps/federatedfilesharing/tests/TestCase.php
index 35fbd97803e..50fcada6d32 100644
--- a/apps/federatedfilesharing/tests/TestCase.php
+++ b/apps/federatedfilesharing/tests/TestCase.php
@@ -39,7 +39,7 @@ abstract class TestCase extends \Test\TestCase {
const TEST_FILES_SHARING_API_USER1 = "test-share-user1";
const TEST_FILES_SHARING_API_USER2 = "test-share-user2";
- public static function setUpBeforeClass() {
+ public static function setUpBeforeClass(): void {
parent::setUpBeforeClass();
// reset backend
@@ -53,14 +53,14 @@ abstract class TestCase extends \Test\TestCase {
$backend->createUser(self::TEST_FILES_SHARING_API_USER2, self::TEST_FILES_SHARING_API_USER2);
}
- protected function setUp() {
+ protected function setUp(): void {
parent::setUp();
//login as user1
self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
}
- public static function tearDownAfterClass() {
+ public static function tearDownAfterClass(): void {
// cleanup users
$user = \OC::$server->getUserManager()->get(self::TEST_FILES_SHARING_API_USER1);
if ($user !== null) {
diff --git a/apps/federatedfilesharing/tests/TokenHandlerTest.php b/apps/federatedfilesharing/tests/TokenHandlerTest.php
index 37798269a38..bd3c0f92911 100644
--- a/apps/federatedfilesharing/tests/TokenHandlerTest.php
+++ b/apps/federatedfilesharing/tests/TokenHandlerTest.php
@@ -39,7 +39,7 @@ class TokenHandlerTest extends \Test\TestCase {
/** @var int */
private $expectedTokenLength = 15;
- public function setUp() {
+ public function setUp(): void {
parent::setUp();
$this->secureRandom = $this->getMockBuilder(ISecureRandom::class)->getMock();