diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-11-28 08:36:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-28 08:36:10 +0100 |
commit | 669302e570024c83140ff5c4f4b1489c5a1c66ed (patch) | |
tree | 010182798f5c83193554031753e063a8a0b35ca1 /apps/federatedfilesharing | |
parent | 125be68311a319f2b839e5aa4ea29cd642cd1e00 (diff) | |
parent | e3e782b63df4f1d65c86cb3b204b4bdecf93a6cd (diff) | |
download | nextcloud-server-669302e570024c83140ff5c4f4b1489c5a1c66ed.tar.gz nextcloud-server-669302e570024c83140ff5c4f4b1489c5a1c66ed.zip |
Merge pull request #18064 from nextcloud/feature/php74
Add php7.4 support
Diffstat (limited to 'apps/federatedfilesharing')
8 files changed, 14 insertions, 13 deletions
diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php index 63691f61624..e6ef4ddd7f3 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() { + protected function setUp(): void { parent::setUp(); $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class) @@ -125,9 +125,10 @@ class AddressHandlerTest extends \Test\TestCase { * @dataProvider dataTestSplitUserRemoteError * * @param string $id - * @expectedException \OC\HintException */ public function testSplitUserRemoteError($id) { + $this->expectException(\OC\HintException::class); + $this->addressHandler->splitUserRemote($id); } diff --git a/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php b/apps/federatedfilesharing/tests/Controller/MountPublicLinkControllerTest.php index db4c3914115..405d83cc91c 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() { + protected 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..1e0863fe1ce 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() { + protected 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() { + protected 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..abc8e9495bc 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() { + protected 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..7eccf846f4b 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() { + protected 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..56039b1f801 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() { + protected function setUp(): void { parent::setUp(); $this->secureRandom = $this->getMockBuilder(ISecureRandom::class)->getMock(); |