diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-21 18:40:38 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 15:34:41 +0300 |
commit | c007ca624f4a95e1a491221d425fcb2fa6e5589a (patch) | |
tree | b60aa133b438eb116ac3579283aa8a7967efd12b /apps/files_external | |
parent | e0f32814e33f9ebb8c42744611048cbfac1eb588 (diff) |
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_external')
22 files changed, 34 insertions, 34 deletions
diff --git a/apps/files_external/tests/Auth/Password/GlobalAuth.php b/apps/files_external/tests/Auth/Password/GlobalAuth.php index c447be7a669..15f8f5f47a9 100644 --- a/apps/files_external/tests/Auth/Password/GlobalAuth.php +++ b/apps/files_external/tests/Auth/Password/GlobalAuth.php @@ -45,7 +45,7 @@ class GlobalAuthTest extends TestCase { */ private $instance; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->l10n = $this->createMock(IL10N::class); $this->credentialsManager = $this->createMock(ICredentialsManager::class); diff --git a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php index dcafdd84e3d..006bb458370 100644 --- a/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php +++ b/apps/files_external/tests/Config/UserPlaceholderHandlerTest.php @@ -50,7 +50,7 @@ class UserPlaceholderHandlerTest extends \Test\TestCase { /** @var UserPlaceholderHandler */ protected $handler; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->createMock(IUser::class); diff --git a/apps/files_external/tests/Controller/AjaxControllerTest.php b/apps/files_external/tests/Controller/AjaxControllerTest.php index f18ee8323b3..a940f49fc2a 100644 --- a/apps/files_external/tests/Controller/AjaxControllerTest.php +++ b/apps/files_external/tests/Controller/AjaxControllerTest.php @@ -48,7 +48,7 @@ class AjaxControllerTest extends TestCase { /** @var AjaxController */ private $ajaxController; - public function setUp() { + public function setUp(): void { $this->request = $this->createMock(IRequest::class); $this->rsa = $this->getMockBuilder('\\OCA\\Files_External\\Lib\\Auth\\PublicKey\\RSA') ->disableOriginalConstructor() diff --git a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php index c3a684f2e98..bcc8d3e2d98 100644 --- a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php @@ -34,7 +34,7 @@ use OCP\ILogger; use OCP\IRequest; class GlobalStoragesControllerTest extends StoragesControllerTest { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->service = $this->getMockBuilder('\OCA\Files_External\Service\GlobalStoragesService') ->disableOriginalConstructor() diff --git a/apps/files_external/tests/Controller/StoragesControllerTest.php b/apps/files_external/tests/Controller/StoragesControllerTest.php index 0340057809d..184b7a6c699 100644 --- a/apps/files_external/tests/Controller/StoragesControllerTest.php +++ b/apps/files_external/tests/Controller/StoragesControllerTest.php @@ -46,11 +46,11 @@ abstract class StoragesControllerTest extends \Test\TestCase { */ protected $service; - public function setUp() { + public function setUp(): void { \OC_Mount_Config::$skipTest = true; } - public function tearDown() { + public function tearDown(): void { \OC_Mount_Config::$skipTest = false; } diff --git a/apps/files_external/tests/Controller/UserStoragesControllerTest.php b/apps/files_external/tests/Controller/UserStoragesControllerTest.php index 067fd45972c..ddd6d01717e 100644 --- a/apps/files_external/tests/Controller/UserStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/UserStoragesControllerTest.php @@ -42,7 +42,7 @@ class UserStoragesControllerTest extends StoragesControllerTest { */ private $oldAllowedBackends; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->service = $this->getMockBuilder('\OCA\Files_External\Service\UserStoragesService') ->disableOriginalConstructor() diff --git a/apps/files_external/tests/Service/BackendServiceTest.php b/apps/files_external/tests/Service/BackendServiceTest.php index 707ee899419..8cd1e680dea 100644 --- a/apps/files_external/tests/Service/BackendServiceTest.php +++ b/apps/files_external/tests/Service/BackendServiceTest.php @@ -37,7 +37,7 @@ class BackendServiceTest extends \Test\TestCase { /** @var \OCP\IConfig|\PHPUnit_Framework_MockObject_MockObject */ protected $config; - protected function setUp() { + protected function setUp(): void { $this->config = $this->createMock(IConfig::class); } diff --git a/apps/files_external/tests/Service/DBConfigServiceTest.php b/apps/files_external/tests/Service/DBConfigServiceTest.php index e6115ddec20..375f1e7018a 100644 --- a/apps/files_external/tests/Service/DBConfigServiceTest.php +++ b/apps/files_external/tests/Service/DBConfigServiceTest.php @@ -44,13 +44,13 @@ class DBConfigServiceTest extends TestCase { private $mounts = []; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); $this->dbConfig = new DBConfigService($this->connection, \OC::$server->getCrypto()); } - public function tearDown() { + public function tearDown(): void { foreach ($this->mounts as $mount) { $this->dbConfig->removeMount($mount); } diff --git a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php index 2760374e59d..c4d1055521a 100644 --- a/apps/files_external/tests/Service/GlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/GlobalStoragesServiceTest.php @@ -33,12 +33,12 @@ use OCA\Files_External\Service\GlobalStoragesService; * @group DB */ class GlobalStoragesServiceTest extends StoragesServiceTest { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->service = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->mountCache); } - public function tearDown() { + public function tearDown(): void { @unlink($this->dataDir . '/mount.json'); parent::tearDown(); } diff --git a/apps/files_external/tests/Service/StoragesServiceTest.php b/apps/files_external/tests/Service/StoragesServiceTest.php index ef0f1852d91..4e2b73f2612 100644 --- a/apps/files_external/tests/Service/StoragesServiceTest.php +++ b/apps/files_external/tests/Service/StoragesServiceTest.php @@ -92,7 +92,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { */ protected $mountCache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dbConfig = new CleaningDBConfig(\OC::$server->getDatabaseConnection(), \OC::$server->getCrypto()); self::$hookCalls = array(); @@ -175,7 +175,7 @@ abstract class StoragesServiceTest extends \Test\TestCase { ->willReturn($containerMock); } - public function tearDown() { + public function tearDown(): void { \OC_Mount_Config::$skipTest = false; self::$hookCalls = array(); if ($this->dbConfig) { diff --git a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php index 3a6d22f2ad4..9a6100d8075 100644 --- a/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php @@ -60,7 +60,7 @@ class UserGlobalStoragesServiceTest extends GlobalStoragesServiceTest { const GROUP_ID = 'test_group'; const GROUP_ID2 = 'test_group2'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->globalStoragesService = $this->service; diff --git a/apps/files_external/tests/Service/UserStoragesServiceTest.php b/apps/files_external/tests/Service/UserStoragesServiceTest.php index ea6346151bf..ce0b3ab65b1 100644 --- a/apps/files_external/tests/Service/UserStoragesServiceTest.php +++ b/apps/files_external/tests/Service/UserStoragesServiceTest.php @@ -50,7 +50,7 @@ class UserStoragesServiceTest extends StoragesServiceTest { */ protected $globalStoragesService; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->globalStoragesService = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->mountCache); diff --git a/apps/files_external/tests/Settings/AdminTest.php b/apps/files_external/tests/Settings/AdminTest.php index 6236f2d416a..3889fe456e4 100644 --- a/apps/files_external/tests/Settings/AdminTest.php +++ b/apps/files_external/tests/Settings/AdminTest.php @@ -43,7 +43,7 @@ class AdminTest extends TestCase { /** @var GlobalAuth|\PHPUnit_Framework_MockObject_MockObject */ private $globalAuth; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->encryptionManager = $this->createMock(IManager::class); $this->globalStoragesService = $this->createMock(GlobalStoragesService::class); diff --git a/apps/files_external/tests/Settings/SectionTest.php b/apps/files_external/tests/Settings/SectionTest.php index b83f8f0feef..3a8a4f5f780 100644 --- a/apps/files_external/tests/Settings/SectionTest.php +++ b/apps/files_external/tests/Settings/SectionTest.php @@ -37,7 +37,7 @@ class SectionTest extends TestCase { /** @var Section */ private $section; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->disableOriginalConstructor()->getMock(); $this->l = $this->getMockBuilder(IL10N::class)->disableOriginalConstructor()->getMock(); diff --git a/apps/files_external/tests/Storage/Amazons3Test.php b/apps/files_external/tests/Storage/Amazons3Test.php index 83552ca21a3..985c93423a7 100644 --- a/apps/files_external/tests/Storage/Amazons3Test.php +++ b/apps/files_external/tests/Storage/Amazons3Test.php @@ -40,7 +40,7 @@ class Amazons3Test extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = include('files_external/tests/config.amazons3.php'); @@ -50,7 +50,7 @@ class Amazons3Test extends \Test\Files\Storage\Storage { $this->instance = new AmazonS3($this->config); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir(''); } diff --git a/apps/files_external/tests/Storage/FtpTest.php b/apps/files_external/tests/Storage/FtpTest.php index 0e12a5f4afa..b2dd83b75a7 100644 --- a/apps/files_external/tests/Storage/FtpTest.php +++ b/apps/files_external/tests/Storage/FtpTest.php @@ -40,7 +40,7 @@ use OCA\Files_External\Lib\Storage\FTP; class FtpTest extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -53,7 +53,7 @@ class FtpTest extends \Test\Files\Storage\Storage { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { \OCP\Files::rmdirr($this->instance->constructUrl('')); } diff --git a/apps/files_external/tests/Storage/OwncloudTest.php b/apps/files_external/tests/Storage/OwncloudTest.php index 3853d0e6ce1..8a274af165e 100644 --- a/apps/files_external/tests/Storage/OwncloudTest.php +++ b/apps/files_external/tests/Storage/OwncloudTest.php @@ -39,7 +39,7 @@ class OwncloudTest extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -52,7 +52,7 @@ class OwncloudTest extends \Test\Files\Storage\Storage { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir('/'); } diff --git a/apps/files_external/tests/Storage/SFTP_KeyTest.php b/apps/files_external/tests/Storage/SFTP_KeyTest.php index c67d418f674..fe40c0fbd95 100644 --- a/apps/files_external/tests/Storage/SFTP_KeyTest.php +++ b/apps/files_external/tests/Storage/SFTP_KeyTest.php @@ -38,7 +38,7 @@ use OCA\Files_External\Lib\Storage\SFTP_Key; class SFTP_KeyTest extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -52,7 +52,7 @@ class SFTP_KeyTest extends \Test\Files\Storage\Storage { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir('/'); } diff --git a/apps/files_external/tests/Storage/SftpTest.php b/apps/files_external/tests/Storage/SftpTest.php index 9ad7cfd56a8..bee514485a5 100644 --- a/apps/files_external/tests/Storage/SftpTest.php +++ b/apps/files_external/tests/Storage/SftpTest.php @@ -45,7 +45,7 @@ class SftpTest extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -58,7 +58,7 @@ class SftpTest extends \Test\Files\Storage\Storage { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir('/'); } diff --git a/apps/files_external/tests/Storage/SmbTest.php b/apps/files_external/tests/Storage/SmbTest.php index fc59f0ed38b..645cb0e2907 100644 --- a/apps/files_external/tests/Storage/SmbTest.php +++ b/apps/files_external/tests/Storage/SmbTest.php @@ -46,7 +46,7 @@ class SmbTest extends \Test\Files\Storage\Storage { */ protected $instance; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -62,7 +62,7 @@ class SmbTest extends \Test\Files\Storage\Storage { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir(''); } diff --git a/apps/files_external/tests/Storage/SwiftTest.php b/apps/files_external/tests/Storage/SwiftTest.php index 6517be493d7..2e1bc5e0ed3 100644 --- a/apps/files_external/tests/Storage/SwiftTest.php +++ b/apps/files_external/tests/Storage/SwiftTest.php @@ -46,7 +46,7 @@ class SwiftTest extends \Test\Files\Storage\Storage { */ protected $instance; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = include('files_external/tests/config.swift.php'); @@ -56,7 +56,7 @@ class SwiftTest extends \Test\Files\Storage\Storage { $this->instance = new Swift($this->config); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { try { $container = $this->instance->getContainer(); diff --git a/apps/files_external/tests/Storage/WebdavTest.php b/apps/files_external/tests/Storage/WebdavTest.php index c0d69592c2a..1aae245d675 100644 --- a/apps/files_external/tests/Storage/WebdavTest.php +++ b/apps/files_external/tests/Storage/WebdavTest.php @@ -39,7 +39,7 @@ use OC\Files\Type\Detection; */ class WebdavTest extends \Test\Files\Storage\Storage { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -55,7 +55,7 @@ class WebdavTest extends \Test\Files\Storage\Storage { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir('/'); } |