diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-21 16:40:38 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 13:34:41 +0100 |
commit | c007ca624f4a95e1a491221d425fcb2fa6e5589a (patch) | |
tree | b60aa133b438eb116ac3579283aa8a7967efd12b /tests/lib/Files | |
parent | e0f32814e33f9ebb8c42744611048cbfac1eb588 (diff) | |
download | nextcloud-server-c007ca624f4a95e1a491221d425fcb2fa6e5589a.tar.gz nextcloud-server-c007ca624f4a95e1a491221d425fcb2fa6e5589a.zip |
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Files')
43 files changed, 66 insertions, 66 deletions
diff --git a/tests/lib/Files/AppData/AppDataTest.php b/tests/lib/Files/AppData/AppDataTest.php index a9353540fff..3932e308de0 100644 --- a/tests/lib/Files/AppData/AppDataTest.php +++ b/tests/lib/Files/AppData/AppDataTest.php @@ -42,7 +42,7 @@ class AppDataTest extends \Test\TestCase { /** @var IAppData */ private $appData; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = $this->createMock(IRootFolder::class); diff --git a/tests/lib/Files/AppData/FactoryTest.php b/tests/lib/Files/AppData/FactoryTest.php index 9b7529b18d9..ceed1f4ed3a 100644 --- a/tests/lib/Files/AppData/FactoryTest.php +++ b/tests/lib/Files/AppData/FactoryTest.php @@ -37,7 +37,7 @@ class FactoryTest extends \Test\TestCase { /** @var Factory */ private $factory; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = $this->createMock(IRootFolder::class); diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php index ccdfbbd065b..b2816c03094 100644 --- a/tests/lib/Files/Cache/CacheTest.php +++ b/tests/lib/Files/Cache/CacheTest.php @@ -777,7 +777,7 @@ class CacheTest extends \Test\TestCase { $this->cache->remove("sub"); } - protected function tearDown() { + protected function tearDown(): void { if ($this->cache) { $this->cache->clear(); } @@ -785,7 +785,7 @@ class CacheTest extends \Test\TestCase { parent::tearDown(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = new \OC\Files\Storage\Temporary(array()); diff --git a/tests/lib/Files/Cache/HomeCacheTest.php b/tests/lib/Files/Cache/HomeCacheTest.php index a144b8cabb8..51fc2e5bc9b 100644 --- a/tests/lib/Files/Cache/HomeCacheTest.php +++ b/tests/lib/Files/Cache/HomeCacheTest.php @@ -66,7 +66,7 @@ class HomeCacheTest extends \Test\TestCase { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = new DummyUser('foo', \OC::$server->getTempManager()->getTemporaryFolder()); diff --git a/tests/lib/Files/Cache/MoveFromCacheTraitTest.php b/tests/lib/Files/Cache/MoveFromCacheTraitTest.php index 3d4a55c0722..f93b95b5fe7 100644 --- a/tests/lib/Files/Cache/MoveFromCacheTraitTest.php +++ b/tests/lib/Files/Cache/MoveFromCacheTraitTest.php @@ -20,7 +20,7 @@ class FallBackCrossCacheMoveCache extends \OC\Files\Cache\Cache { * @group DB */ class MoveFromCacheTraitTest extends CacheTest { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = new \OC\Files\Storage\Temporary(array()); diff --git a/tests/lib/Files/Cache/PropagatorTest.php b/tests/lib/Files/Cache/PropagatorTest.php index 402b29c8c3e..bbf36329461 100644 --- a/tests/lib/Files/Cache/PropagatorTest.php +++ b/tests/lib/Files/Cache/PropagatorTest.php @@ -20,7 +20,7 @@ class PropagatorTest extends TestCase { /** @var IStorage */ private $storage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->storage = new Temporary(); $this->storage->mkdir('foo/bar'); diff --git a/tests/lib/Files/Cache/QuerySearchHelperTest.php b/tests/lib/Files/Cache/QuerySearchHelperTest.php index addeac71350..5a9d3022099 100644 --- a/tests/lib/Files/Cache/QuerySearchHelperTest.php +++ b/tests/lib/Files/Cache/QuerySearchHelperTest.php @@ -48,7 +48,7 @@ class QuerySearchHelperTest extends TestCase { /** @var integer */ private $numericStorageId; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->builder = \OC::$server->getDatabaseConnection()->getQueryBuilder(); $this->mimetypeLoader = $this->createMock(IMimeTypeLoader::class); @@ -83,7 +83,7 @@ class QuerySearchHelperTest extends TestCase { ->where($this->builder->expr()->eq('storage', new Literal($this->numericStorageId))); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $builder = \OC::$server->getDatabaseConnection()->getQueryBuilder(); diff --git a/tests/lib/Files/Cache/ScannerTest.php b/tests/lib/Files/Cache/ScannerTest.php index 0f5335f4416..1c0a8b0e0e9 100644 --- a/tests/lib/Files/Cache/ScannerTest.php +++ b/tests/lib/Files/Cache/ScannerTest.php @@ -33,7 +33,7 @@ class ScannerTest extends \Test\TestCase { */ private $cache; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = new \OC\Files\Storage\Temporary(array()); @@ -41,7 +41,7 @@ class ScannerTest extends \Test\TestCase { $this->cache = new \OC\Files\Cache\Cache($this->storage); } - protected function tearDown() { + protected function tearDown(): void { if ($this->cache) { $this->cache->clear(); } diff --git a/tests/lib/Files/Cache/UpdaterLegacyTest.php b/tests/lib/Files/Cache/UpdaterLegacyTest.php index a0cc1c5d89c..e20cfe2ac12 100644 --- a/tests/lib/Files/Cache/UpdaterLegacyTest.php +++ b/tests/lib/Files/Cache/UpdaterLegacyTest.php @@ -37,7 +37,7 @@ class UpdaterLegacyTest extends \Test\TestCase { private static $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = new \OC\Files\Storage\Temporary(array()); @@ -68,7 +68,7 @@ class UpdaterLegacyTest extends \Test\TestCase { \OC_Hook::clear('OC_Filesystem'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->cache) { $this->cache->clear(); } diff --git a/tests/lib/Files/Cache/UpdaterTest.php b/tests/lib/Files/Cache/UpdaterTest.php index 54fb3f3fc97..8dc5893007b 100644 --- a/tests/lib/Files/Cache/UpdaterTest.php +++ b/tests/lib/Files/Cache/UpdaterTest.php @@ -40,7 +40,7 @@ class UpdaterTest extends \Test\TestCase { */ protected $updater; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->loginAsUser(); @@ -50,7 +50,7 @@ class UpdaterTest extends \Test\TestCase { $this->cache = $this->storage->getCache(); } - protected function tearDown() { + protected function tearDown(): void { Filesystem::clearMounts(); $this->logout(); diff --git a/tests/lib/Files/Cache/WatcherTest.php b/tests/lib/Files/Cache/WatcherTest.php index d4aa9ac875e..18f0ebe98a9 100644 --- a/tests/lib/Files/Cache/WatcherTest.php +++ b/tests/lib/Files/Cache/WatcherTest.php @@ -22,13 +22,13 @@ class WatcherTest extends \Test\TestCase { */ private $storages = array(); - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->loginAsUser(); } - protected function tearDown() { + protected function tearDown(): void { foreach ($this->storages as $storage) { $cache = $storage->getCache(); $ids = $cache->getAll(); diff --git a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php index 365049c1cc6..744e132d2cc 100644 --- a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php +++ b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php @@ -24,7 +24,7 @@ class CacheJailTest extends CacheTest { */ protected $sourceCache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->storage->mkdir('foo'); $this->sourceCache = $this->cache; diff --git a/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php b/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php index c12b35867ff..0e2460f74e2 100644 --- a/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php +++ b/tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php @@ -24,7 +24,7 @@ class CachePermissionsMaskTest extends CacheTest { */ protected $sourceCache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->storage->mkdir('foo'); $this->sourceCache = $this->cache; diff --git a/tests/lib/Files/Config/UserMountCacheTest.php b/tests/lib/Files/Config/UserMountCacheTest.php index 4bfc8710951..ba1011aa68e 100644 --- a/tests/lib/Files/Config/UserMountCacheTest.php +++ b/tests/lib/Files/Config/UserMountCacheTest.php @@ -42,7 +42,7 @@ class UserMountCacheTest extends TestCase { private $fileIds = []; - public function setUp() { + public function setUp(): void { $this->fileIds = []; $this->connection = \OC::$server->getDatabaseConnection(); $this->userManager = new Manager($this->createMock(IConfig::class), $this->createMock(EventDispatcherInterface::class)); @@ -54,7 +54,7 @@ class UserMountCacheTest extends TestCase { $this->cache = new \OC\Files\Config\UserMountCache($this->connection, $this->userManager, $this->createMock(Log::class)); } - public function tearDown() { + public function tearDown(): void { $builder = $this->connection->getQueryBuilder(); $builder->delete('mounts')->execute(); diff --git a/tests/lib/Files/EtagTest.php b/tests/lib/Files/EtagTest.php index ef7bf7cfbb7..acda220d01f 100644 --- a/tests/lib/Files/EtagTest.php +++ b/tests/lib/Files/EtagTest.php @@ -28,7 +28,7 @@ class EtagTest extends \Test\TestCase { */ private $userBackend; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_Hook::clear('OC_Filesystem', 'setup'); @@ -46,7 +46,7 @@ class EtagTest extends \Test\TestCase { \OC_User::useBackend($this->userBackend); } - protected function tearDown() { + protected function tearDown(): void { \OC::$server->getConfig()->setSystemValue('datadirectory', $this->datadir); $this->logout(); diff --git a/tests/lib/Files/FileInfoTest.php b/tests/lib/Files/FileInfoTest.php index b1ab880ad70..5c7c5cdc361 100644 --- a/tests/lib/Files/FileInfoTest.php +++ b/tests/lib/Files/FileInfoTest.php @@ -23,7 +23,7 @@ class FileInfoTest extends TestCase { private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->createUser('foo', 'foo'); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php index 6fc6fbe9d7c..6b6e3feda33 100644 --- a/tests/lib/Files/FilesystemTest.php +++ b/tests/lib/Files/FilesystemTest.php @@ -77,7 +77,7 @@ class FilesystemTest extends \Test\TestCase { return array('datadir' => $dir); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $userBackend = new \Test\Util\User\Dummy(); $userBackend->createUser(self::TEST_FILESYSTEM_USER1, self::TEST_FILESYSTEM_USER1); @@ -86,7 +86,7 @@ class FilesystemTest extends \Test\TestCase { $this->loginAsUser(); } - protected function tearDown() { + protected function tearDown(): void { foreach ($this->tmpDirs as $dir) { \OC_Helper::rmdirr($dir); } diff --git a/tests/lib/Files/Mount/ManagerTest.php b/tests/lib/Files/Mount/ManagerTest.php index 7633ffb2f2d..f3cdc4264e4 100644 --- a/tests/lib/Files/Mount/ManagerTest.php +++ b/tests/lib/Files/Mount/ManagerTest.php @@ -22,7 +22,7 @@ class ManagerTest extends \Test\TestCase { */ private $manager; - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->manager = new \OC\Files\Mount\Manager(); } diff --git a/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php b/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php index 9aa0143b4a7..5cd517df3c9 100644 --- a/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php +++ b/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php @@ -21,7 +21,7 @@ class ObjectHomeMountProviderTest extends \Test\TestCase { /** @var IStorageFactory|\PHPUnit_Framework_MockObject_MockObject */ protected $loader; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Files/Node/HookConnectorTest.php b/tests/lib/Files/Node/HookConnectorTest.php index 5180dbb9fe2..9c47df02f3b 100644 --- a/tests/lib/Files/Node/HookConnectorTest.php +++ b/tests/lib/Files/Node/HookConnectorTest.php @@ -53,7 +53,7 @@ class HookConnectorTest extends TestCase { */ private $userId; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userId = $this->getUniqueID(); $this->createUser($this->userId, 'pass'); @@ -71,7 +71,7 @@ class HookConnectorTest extends TestCase { $this->eventDispatcher = \OC::$server->getEventDispatcher(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); \OC_Hook::clear('OC_Filesystem'); \OC_Util::tearDownFS(); diff --git a/tests/lib/Files/Node/IntegrationTest.php b/tests/lib/Files/Node/IntegrationTest.php index 6d9b0ce20b9..2a542a1097a 100644 --- a/tests/lib/Files/Node/IntegrationTest.php +++ b/tests/lib/Files/Node/IntegrationTest.php @@ -38,7 +38,7 @@ class IntegrationTest extends \Test\TestCase { */ private $view; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $manager = \OC\Files\Filesystem::getMountManager(); @@ -65,7 +65,7 @@ class IntegrationTest extends \Test\TestCase { $this->root->mount($subStorage, '/substorage/'); } - protected function tearDown() { + protected function tearDown(): void { foreach ($this->storages as $storage) { $storage->getCache()->clear(); } diff --git a/tests/lib/Files/Node/NodeTest.php b/tests/lib/Files/Node/NodeTest.php index 566c84e2c85..14ae0b0ead3 100644 --- a/tests/lib/Files/Node/NodeTest.php +++ b/tests/lib/Files/Node/NodeTest.php @@ -43,7 +43,7 @@ abstract class NodeTest extends \Test\TestCase { /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ protected $userManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->createMock(IUser::class); diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php index 8a6e5411f26..70ffe1b25c4 100644 --- a/tests/lib/Files/Node/RootTest.php +++ b/tests/lib/Files/Node/RootTest.php @@ -36,7 +36,7 @@ class RootTest extends \Test\TestCase { /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ private $userManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->createMock(IUser::class); diff --git a/tests/lib/Files/ObjectStore/NoopScannerTest.php b/tests/lib/Files/ObjectStore/NoopScannerTest.php index 1832ed8d61a..8b879e8ab37 100644 --- a/tests/lib/Files/ObjectStore/NoopScannerTest.php +++ b/tests/lib/Files/ObjectStore/NoopScannerTest.php @@ -19,7 +19,7 @@ class NoopScannerTest extends \Test\TestCase { /** @var \OC\Files\ObjectStore\NoopScanner $scanner */ private $scanner; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = new \OC\Files\Storage\Temporary(array()); diff --git a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php index ce9c9d2cd69..b8c7b15e039 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreStorageTest.php @@ -38,7 +38,7 @@ class ObjectStoreStorageTest extends Storage { */ private $objectStorage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $baseStorage = new Temporary(); @@ -47,7 +47,7 @@ class ObjectStoreStorageTest extends Storage { $this->instance = new ObjectStoreStorageOverwrite($config); } - protected function tearDown() { + protected function tearDown(): void { if (is_null($this->instance)) { return; } diff --git a/tests/lib/Files/PathVerificationTest.php b/tests/lib/Files/PathVerificationTest.php index 7e0b7dd2650..02ea3df6cb6 100644 --- a/tests/lib/Files/PathVerificationTest.php +++ b/tests/lib/Files/PathVerificationTest.php @@ -25,7 +25,7 @@ class PathVerificationTest extends \Test\TestCase { */ private $view; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->view = new View(); } diff --git a/tests/lib/Files/SimpleFS/SimpleFileTest.php b/tests/lib/Files/SimpleFS/SimpleFileTest.php index b31fa348afa..ba8688fea01 100644 --- a/tests/lib/Files/SimpleFS/SimpleFileTest.php +++ b/tests/lib/Files/SimpleFS/SimpleFileTest.php @@ -36,7 +36,7 @@ class SimpleFileTest extends \Test\TestCase { /** @var SimpleFile */ private $simpleFile; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->file = $this->createMock(File::class); diff --git a/tests/lib/Files/SimpleFS/SimpleFolderTest.php b/tests/lib/Files/SimpleFS/SimpleFolderTest.php index 551d8c95205..9c55367f44f 100644 --- a/tests/lib/Files/SimpleFS/SimpleFolderTest.php +++ b/tests/lib/Files/SimpleFS/SimpleFolderTest.php @@ -37,7 +37,7 @@ class SimpleFolderTest extends \Test\TestCase { /** @var SimpleFolder */ private $simpleFolder; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->folder = $this->createMock(Folder::class); diff --git a/tests/lib/Files/Storage/CommonTest.php b/tests/lib/Files/Storage/CommonTest.php index f7be996e5ea..0900765c510 100644 --- a/tests/lib/Files/Storage/CommonTest.php +++ b/tests/lib/Files/Storage/CommonTest.php @@ -39,14 +39,14 @@ class CommonTest extends Storage { */ private $tmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); $this->instance = new \OC\Files\Storage\CommonTest(['datadir' => $this->tmpDir]); } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->tmpDir); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/CopyDirectoryTest.php b/tests/lib/Files/Storage/CopyDirectoryTest.php index 034ffb5a53a..d56cc37124d 100644 --- a/tests/lib/Files/Storage/CopyDirectoryTest.php +++ b/tests/lib/Files/Storage/CopyDirectoryTest.php @@ -45,7 +45,7 @@ class CopyDirectoryStorage extends StorageNoRecursiveCopy { */ class CopyDirectoryTest extends Storage { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = new CopyDirectoryStorage([]); } diff --git a/tests/lib/Files/Storage/HomeTest.php b/tests/lib/Files/Storage/HomeTest.php index e6899ff7d38..6075e9af293 100644 --- a/tests/lib/Files/Storage/HomeTest.php +++ b/tests/lib/Files/Storage/HomeTest.php @@ -67,7 +67,7 @@ class HomeTest extends Storage { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -76,7 +76,7 @@ class HomeTest extends Storage { $this->instance = new \OC\Files\Storage\Home(array('user' => $this->user)); } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->tmpDir); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/LocalTest.php b/tests/lib/Files/Storage/LocalTest.php index c611a990236..3b83a349cfa 100644 --- a/tests/lib/Files/Storage/LocalTest.php +++ b/tests/lib/Files/Storage/LocalTest.php @@ -35,14 +35,14 @@ class LocalTest extends Storage { */ private $tmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); $this->instance = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir)); } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->tmpDir); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php b/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php index 1672d17e36b..e8eb49ec014 100644 --- a/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php +++ b/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php @@ -35,7 +35,7 @@ class AvailabilityTest extends \Test\TestCase { /** @var Availability */ protected $wrapper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->storageCache = $this->createMock(StorageCache::class); diff --git a/tests/lib/Files/Storage/Wrapper/EncodingTest.php b/tests/lib/Files/Storage/Wrapper/EncodingTest.php index 24bf10eb789..5b4443eecfc 100644 --- a/tests/lib/Files/Storage/Wrapper/EncodingTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncodingTest.php @@ -18,7 +18,7 @@ class EncodingTest extends \Test\Files\Storage\Storage { */ private $sourceStorage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sourceStorage = new \OC\Files\Storage\Temporary([]); $this->instance = new \OC\Files\Storage\Wrapper\Encoding([ @@ -26,7 +26,7 @@ class EncodingTest extends \Test\Files\Storage\Storage { ]); } - public function tearDown() { + public function tearDown(): void { $this->sourceStorage->cleanUp(); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php index 70d94ab16e6..eb43eb73359 100644 --- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php @@ -108,7 +108,7 @@ class EncryptionTest extends Storage { /** @var integer dummy unencrypted size */ private $dummySize = -1; - protected function setUp() { + protected function setUp(): void { parent::setUp(); diff --git a/tests/lib/Files/Storage/Wrapper/JailTest.php b/tests/lib/Files/Storage/Wrapper/JailTest.php index b03eb0bcc63..1091809f96c 100644 --- a/tests/lib/Files/Storage/Wrapper/JailTest.php +++ b/tests/lib/Files/Storage/Wrapper/JailTest.php @@ -15,7 +15,7 @@ class JailTest extends \Test\Files\Storage\Storage { */ private $sourceStorage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sourceStorage = new \OC\Files\Storage\Temporary(array()); $this->sourceStorage->mkdir('foo'); @@ -25,7 +25,7 @@ class JailTest extends \Test\Files\Storage\Storage { )); } - public function tearDown() { + public function tearDown(): void { // test that nothing outside our jail is touched $contents = array(); $dh = $this->sourceStorage->opendir(''); diff --git a/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php b/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php index 388272b4107..c9545ae3f28 100644 --- a/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php +++ b/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php @@ -22,13 +22,13 @@ class PermissionsMaskTest extends \Test\Files\Storage\Storage { */ private $sourceStorage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sourceStorage = new \OC\Files\Storage\Temporary(array()); $this->instance = $this->getMaskedStorage(Constants::PERMISSION_ALL); } - public function tearDown() { + public function tearDown(): void { $this->sourceStorage->cleanUp(); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/Wrapper/QuotaTest.php b/tests/lib/Files/Storage/Wrapper/QuotaTest.php index 0b80467fcc4..0061ca3910e 100644 --- a/tests/lib/Files/Storage/Wrapper/QuotaTest.php +++ b/tests/lib/Files/Storage/Wrapper/QuotaTest.php @@ -27,7 +27,7 @@ class QuotaTest extends \Test\Files\Storage\Storage { */ private $tmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -35,7 +35,7 @@ class QuotaTest extends \Test\Files\Storage\Storage { $this->instance = new \OC\Files\Storage\Wrapper\Quota(array('storage' => $storage, 'quota' => 10000000)); } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->tmpDir); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/Wrapper/WrapperTest.php b/tests/lib/Files/Storage/Wrapper/WrapperTest.php index 942ff27fc35..2477b361bc1 100644 --- a/tests/lib/Files/Storage/Wrapper/WrapperTest.php +++ b/tests/lib/Files/Storage/Wrapper/WrapperTest.php @@ -14,7 +14,7 @@ class WrapperTest extends \Test\Files\Storage\Storage { */ private $tmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -22,7 +22,7 @@ class WrapperTest extends \Test\Files\Storage\Storage { $this->instance = new \OC\Files\Storage\Wrapper\Wrapper(array('storage' => $storage)); } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->tmpDir); parent::tearDown(); } diff --git a/tests/lib/Files/Type/DetectionTest.php b/tests/lib/Files/Type/DetectionTest.php index 1d01a96fcc0..c0cd2a24411 100644 --- a/tests/lib/Files/Type/DetectionTest.php +++ b/tests/lib/Files/Type/DetectionTest.php @@ -28,7 +28,7 @@ class DetectionTest extends \Test\TestCase { /** @var Detection */ private $detection; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->detection = new Detection( \OC::$server->getURLGenerator(), diff --git a/tests/lib/Files/Type/LoaderTest.php b/tests/lib/Files/Type/LoaderTest.php index cf6aa31a047..a99c80dac47 100644 --- a/tests/lib/Files/Type/LoaderTest.php +++ b/tests/lib/Files/Type/LoaderTest.php @@ -30,12 +30,12 @@ class LoaderTest extends \Test\TestCase { /** @var Loader */ protected $loader; - protected function setUp() { + protected function setUp(): void { $this->db = \OC::$server->getDatabaseConnection(); $this->loader = new Loader($this->db); } - protected function tearDown() { + protected function tearDown(): void { $deleteMimetypes = $this->db->getQueryBuilder(); $deleteMimetypes->delete('mimetypes') ->where($deleteMimetypes->expr()->like( diff --git a/tests/lib/Files/Utils/ScannerTest.php b/tests/lib/Files/Utils/ScannerTest.php index 8748b52f0ca..9f057960b60 100644 --- a/tests/lib/Files/Utils/ScannerTest.php +++ b/tests/lib/Files/Utils/ScannerTest.php @@ -47,7 +47,7 @@ class ScannerTest extends \Test\TestCase { */ private $userBackend; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userBackend = new \Test\Util\User\Dummy(); @@ -55,7 +55,7 @@ class ScannerTest extends \Test\TestCase { $this->loginAsUser(); } - protected function tearDown() { + protected function tearDown(): void { $this->logout(); \OC::$server->getUserManager()->removeBackend($this->userBackend); parent::tearDown(); diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index c154c28e24a..1e564c69092 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -85,7 +85,7 @@ class ViewTest extends \Test\TestCase { /** @var \OC\Files\Storage\Storage */ private $tempStorage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_Hook::clear(); @@ -109,7 +109,7 @@ class ViewTest extends \Test\TestCase { $this->tempStorage = null; } - protected function tearDown() { + protected function tearDown(): void { \OC_User::setUserId($this->user); foreach ($this->storages as $storage) { $cache = $storage->getCache(); |