From 467e3687429ad4f05064487883873f84b64b67c6 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 30 Nov 2019 17:07:33 +0545 Subject: [PATCH 01/15] bump php 7.2 phpunit 8.4 --- composer.json | 6 +- composer.lock | 269 ++++++++++++++++++++++++++++++-------------------- 2 files changed, 167 insertions(+), 108 deletions(-) diff --git a/composer.json b/composer.json index 58deb71da0ee..fe05e2fb317e 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "optimize-autoloader": true, "classmap-authoritative": false, "platform": { - "php": "7.1" + "php": "7.2" } }, "autoload" : { @@ -26,11 +26,11 @@ "bamarni/composer-bin-plugin": "^1.2", "jakub-onderka/php-console-highlighter": "^0.4", "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "^7.5", + "phpunit/phpunit": "^8.4", "roave/security-advisories": "dev-master" }, "require": { - "php": ">=7.1", + "php": ">=7.2", "doctrine/dbal": "^2.8", "phpseclib/phpseclib": "^2.0", "jeremeamia/superclosure": "^2.4", diff --git a/composer.lock b/composer.lock index a8d2cb35740c..6235fb67a65e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3e027015240ee48c59e781bd63f1d61e", + "content-hash": "0ea0120a0fa045d40fddd9dfbcb9c953", "packages": [ { "name": "bantu/ini-get-wrapper", @@ -285,16 +285,16 @@ }, { "name": "doctrine/cache", - "version": "1.9.1", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "89a5c76c39c292f7798f964ab3c836c3f8192a55" + "reference": "382e7f4db9a12dc6c19431743a2b096041bcdd62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/89a5c76c39c292f7798f964ab3c836c3f8192a55", - "reference": "89a5c76c39c292f7798f964ab3c836c3f8192a55", + "url": "https://api.github.com/repos/doctrine/cache/zipball/382e7f4db9a12dc6c19431743a2b096041bcdd62", + "reference": "382e7f4db9a12dc6c19431743a2b096041bcdd62", "shasum": "" }, "require": { @@ -361,38 +361,36 @@ "memcached", "php", "redis", - "riak", "xcache" ], - "time": "2019-11-15T14:31:57+00:00" + "time": "2019-11-29T15:36:20+00:00" }, { "name": "doctrine/dbal", - "version": "v2.9.3", + "version": "v2.10.0", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "7345cd59edfa2036eb0fa4264b77ae2576842035" + "reference": "0c9a646775ef549eb0a213a4f9bd4381d9b4d934" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/7345cd59edfa2036eb0fa4264b77ae2576842035", - "reference": "7345cd59edfa2036eb0fa4264b77ae2576842035", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/0c9a646775ef549eb0a213a4f9bd4381d9b4d934", + "reference": "0c9a646775ef549eb0a213a4f9bd4381d9b4d934", "shasum": "" }, "require": { "doctrine/cache": "^1.0", "doctrine/event-manager": "^1.0", "ext-pdo": "*", - "php": "^7.1" + "php": "^7.2" }, "require-dev": { - "doctrine/coding-standard": "^5.0", - "jetbrains/phpstorm-stubs": "^2018.1.2", - "phpstan/phpstan": "^0.10.1", - "phpunit/phpunit": "^7.4", - "symfony/console": "^2.0.5|^3.0|^4.0", - "symfony/phpunit-bridge": "^3.4.5|^4.0.5" + "doctrine/coding-standard": "^6.0", + "jetbrains/phpstorm-stubs": "^2019.1", + "phpstan/phpstan": "^0.11.3", + "phpunit/phpunit": "^8.4.1", + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -403,7 +401,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.9.x-dev", + "dev-master": "2.10.x-dev", "dev-develop": "3.0.x-dev" } }, @@ -439,14 +437,25 @@ "keywords": [ "abstraction", "database", + "db2", "dbal", + "mariadb", + "mssql", "mysql", - "persistence", + "oci8", + "oracle", + "pdo", "pgsql", - "php", - "queryobject" - ], - "time": "2019-11-02T22:19:34+00:00" + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlanywhere", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "time": "2019-11-03T16:50:43+00:00" }, { "name": "doctrine/event-manager", @@ -526,28 +535,30 @@ }, { "name": "doctrine/lexer", - "version": "1.0.2", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8" + "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/1febd6c3ef84253d7c815bed85fc622ad207a9f8", - "reference": "1febd6c3ef84253d7c815bed85fc622ad207a9f8", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", + "reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^7.2" }, "require-dev": { - "phpunit/phpunit": "^4.5" + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -560,14 +571,14 @@ "MIT" ], "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, { "name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com" }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com" @@ -582,7 +593,7 @@ "parser", "php" ], - "time": "2019-06-08T11:03:04+00:00" + "time": "2019-10-30T14:39:59+00:00" }, { "name": "egulias/email-validator", @@ -2334,32 +2345,32 @@ }, { "name": "symfony/debug", - "version": "v3.4.35", + "version": "v4.4.0", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "f72e33fdb1170b326e72c3157f0cd456351dd086" + "reference": "b24b791f817116b29e52a63e8544884cf9a40757" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/f72e33fdb1170b326e72c3157f0cd456351dd086", - "reference": "f72e33fdb1170b326e72c3157f0cd456351dd086", + "url": "https://api.github.com/repos/symfony/debug/zipball/b24b791f817116b29e52a63e8544884cf9a40757", + "reference": "b24b791f817116b29e52a63e8544884cf9a40757", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": "^7.1.3", "psr/log": "~1.0" }, "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0|~4.0" + "symfony/http-kernel": "^3.4|^4.0|^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.4-dev" } }, "autoload": { @@ -2386,7 +2397,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2019-10-24T15:33:53+00:00" + "time": "2019-11-10T17:54:30+00:00" }, { "name": "symfony/event-dispatcher", @@ -2453,7 +2464,7 @@ }, { "name": "symfony/polyfill-iconv", - "version": "v1.13.0", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", @@ -2512,7 +2523,7 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.13.0", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", @@ -2574,7 +2585,7 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.0", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", @@ -2633,7 +2644,7 @@ }, { "name": "symfony/polyfill-php56", - "version": "v1.13.0", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php56.git", @@ -2689,7 +2700,7 @@ }, { "name": "symfony/polyfill-php72", - "version": "v1.13.0", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", @@ -2744,7 +2755,7 @@ }, { "name": "symfony/polyfill-util", - "version": "v1.13.0", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-util.git", @@ -3894,40 +3905,40 @@ }, { "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "version": "7.0.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f1884187926fbb755a9aaf0b3836ad3165b478bf", + "reference": "f1884187926fbb755a9aaf0b3836ad3165b478bf", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", + "php": "^7.2", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", + "phpunit/php-token-stream": "^3.1.1", "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", + "sebastian/environment": "^4.2.2", "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "theseer/tokenizer": "^1.1.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^8.2.2" }, "suggest": { - "ext-xdebug": "^2.6.0" + "ext-xdebug": "^2.7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "7.0-dev" } }, "autoload": { @@ -3953,7 +3964,7 @@ "testing", "xunit" ], - "time": "2018-10-31T16:06:48+00:00" + "time": "2019-11-20T13:55:58+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4146,53 +4157,52 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.17", + "version": "8.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "4c92a15296e58191a4cd74cff3b34fc8e374174a" + "reference": "67f9e35bffc0dd52d55d565ddbe4230454fd6a4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4c92a15296e58191a4cd74cff3b34fc8e374174a", - "reference": "4c92a15296e58191a4cd74cff3b34fc8e374174a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/67f9e35bffc0dd52d55d565ddbe4230454fd6a4e", + "reference": "67f9e35bffc0dd52d55d565ddbe4230454fd6a4e", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.1", + "doctrine/instantiator": "^1.2.0", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.9.1", + "phar-io/manifest": "^1.0.3", + "phar-io/version": "^2.0.1", + "php": "^7.2", + "phpspec/prophecy": "^1.8.1", + "phpunit/php-code-coverage": "^7.0.7", + "phpunit/php-file-iterator": "^2.0.2", "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.2", + "sebastian/exporter": "^3.1.1", + "sebastian/global-state": "^3.0.0", "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", "sebastian/version": "^2.0.1" }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-soap": "*", "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "phpunit/php-invoker": "^2.0.0" }, "bin": [ "phpunit" @@ -4200,7 +4210,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "8.4-dev" } }, "autoload": { @@ -4226,7 +4236,7 @@ "testing", "xunit" ], - "time": "2019-10-28T10:37:36+00:00" + "time": "2019-11-06T09:42:23+00:00" }, { "name": "roave/security-advisories", @@ -4234,12 +4244,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "7b05f1705362f8a8a4b535ec5c0f174eaf4d09ec" + "reference": "9986511fcd47e8b8ec491884cc18beee1773548a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/7b05f1705362f8a8a4b535ec5c0f174eaf4d09ec", - "reference": "7b05f1705362f8a8a4b535ec5c0f174eaf4d09ec", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/9986511fcd47e8b8ec491884cc18beee1773548a", + "reference": "9986511fcd47e8b8ec491884cc18beee1773548a", "shasum": "" }, "conflict": { @@ -4342,7 +4352,7 @@ "silverstripe/userforms": "<3", "simple-updates/phpwhois": "<=1", "simplesamlphp/saml2": "<1.10.6|>=2,<2.3.8|>=3,<3.1.4", - "simplesamlphp/simplesamlphp": "<1.18", + "simplesamlphp/simplesamlphp": "<1.17.8", "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", "slim/slim": "<2.6", "smarty/smarty": "<3.1.33", @@ -4444,7 +4454,7 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2019-11-27T20:26:33+00:00" + "time": "2019-11-29T17:22:08+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4733,23 +4743,26 @@ }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", + "reference": "edf8a461cf1d4005f19fb0b6b8b95a9f7fa0adc4", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-dom": "*", + "phpunit/phpunit": "^8.0" }, "suggest": { "ext-uopz": "*" @@ -4757,7 +4770,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -4780,7 +4793,7 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2019-02-01T05:30:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -4969,6 +4982,52 @@ "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "time": "2018-10-04T04:07:39+00:00" }, + { + "name": "sebastian/type", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/3aaaa15fa71d27650d62a948be022fe3b48541a3", + "reference": "3aaaa15fa71d27650d62a948be022fe3b48541a3", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "time": "2019-07-02T08:10:15+00:00" + }, { "name": "sebastian/version", "version": "2.0.1", @@ -5014,7 +5073,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.0", + "version": "v1.13.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -5167,11 +5226,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.1", + "php": ">=7.2", "ext-json": "*" }, "platform-dev": [], "platform-overrides": { - "php": "7.1" + "php": "7.2" } } From 61fee1f27acfcfb2526d5c919f42986d5976f640 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 30 Nov 2019 17:09:31 +0545 Subject: [PATCH 02/15] Do not allow PHP 7.1 --- console.php | 8 ++++---- index.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/console.php b/console.php index 92365fa227a6..3d6a3b55a052 100644 --- a/console.php +++ b/console.php @@ -33,10 +33,10 @@ \define('OC_CONSOLE', 1); -// Show warning if a PHP version below 7.1.0 is used, this has to happen here -// because base.php will already use 7.1 syntax. -if (\version_compare(PHP_VERSION, '7.1.0') === -1) { - echo 'This version of ownCloud requires at least PHP 7.1.0'.PHP_EOL; +// Show warning if a PHP version below 7.2.0 is used, this has to happen here +// because base.php will already use 7.2 syntax. +if (\version_compare(PHP_VERSION, '7.2.0') === -1) { + echo 'This version of ownCloud requires at least PHP 7.2.0'.PHP_EOL; echo 'You are currently running PHP ' . PHP_VERSION . '. Please update your PHP version.'.PHP_EOL; exit(1); } diff --git a/index.php b/index.php index 0e36dddc8ed6..582ec928fc8e 100644 --- a/index.php +++ b/index.php @@ -27,10 +27,10 @@ * */ -// Show warning if a PHP version below 7.1.0 is used, this has to happen here -// because base.php will already use 7.1 syntax. -if (\version_compare(PHP_VERSION, '7.1.0') === -1) { - echo 'This version of ownCloud requires at least PHP 7.1.0
'; +// Show warning if a PHP version below 7.2.0 is used, this has to happen here +// because base.php will already use 7.2 syntax. +if (\version_compare(PHP_VERSION, '7.2.0') === -1) { + echo 'This version of ownCloud requires at least PHP 7.2.0
'; echo 'You are currently running PHP ' . PHP_VERSION . '. Please update your PHP version.'; return; } From 0f552dd749401d04515b223feef9371f15c6b2ae Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 30 Nov 2019 17:11:46 +0545 Subject: [PATCH 03/15] Remove PHP 7.1 from drone matrix --- .drone.starlark | 23 +- .drone.yml | 2353 ++++++++++++++++++++--------------------------- 2 files changed, 988 insertions(+), 1388 deletions(-) diff --git a/.drone.starlark b/.drone.starlark index 63360bca40ff..f13e21663587 100644 --- a/.drone.starlark +++ b/.drone.starlark @@ -25,12 +25,11 @@ config = { 'phpunit': { 'allDatabases' : { 'phpVersions': [ - '7.1', + '7.2', ] }, 'reducedDatabases' : { 'phpVersions': [ - '7.2', '7.3', ], 'databases': [ @@ -41,7 +40,7 @@ config = { }, 'external-samba-windows' : { 'phpVersions': [ - '7.1', + '7.2', ], 'databases': [ 'sqlite', @@ -60,7 +59,7 @@ config = { }, 'external-other' : { 'phpVersions': [ - '7.1', + '7.2', ], 'databases': [ 'sqlite', @@ -270,7 +269,7 @@ def dependencies(): return pipelines default = { - 'phpVersions': ['7.1'], + 'phpVersions': ['7.2'], } if 'defaults' in config: @@ -468,7 +467,7 @@ def phpstan(): return pipelines default = { - 'phpVersions': ['7.1'], + 'phpVersions': ['7.2'], 'logLevel': '2', } @@ -545,7 +544,7 @@ def phan(): return pipelines default = { - 'phpVersions': ['7.1', '7.2', '7.3'], + 'phpVersions': ['7.2', '7.3'], 'logLevel': '2', } @@ -622,7 +621,7 @@ def litmus(): return pipelines default = { - 'phpVersions': ['7.1'], + 'phpVersions': ['7.2'], 'logLevel': '2' } @@ -788,7 +787,7 @@ def dav(): return pipelines default = { - 'phpVersions': ['7.1'], + 'phpVersions': ['7.2'], 'logLevel': '2' } @@ -886,7 +885,7 @@ def javascript(): default = { 'coverage': True, 'logLevel': '2', - 'phpVersion': '7.1' + 'phpVersion': '7.2' } if 'defaults' in config: @@ -982,7 +981,7 @@ def phptests(testType): errorFound = False default = { - 'phpVersions': ['7.1', '7.2', '7.3'], + 'phpVersions': ['7.2', '7.3'], 'databases': [ 'sqlite', 'mariadb:10.2', 'mariadb:10.3', 'mysql:5.5', 'mysql:5.7', 'mysql:8.0', 'postgres:9.4', 'postgres:10.3', 'oracle' ], @@ -1166,7 +1165,7 @@ def acceptance(): default = { 'federatedServerVersions': [''], 'browsers': ['chrome'], - 'phpVersions': ['7.1'], + 'phpVersions': ['7.2'], 'databases': ['mariadb:10.2'], 'federatedServerNeeded': False, 'filterTags': '', diff --git a/.drone.yml b/.drone.yml index fc107b9b215d..5d01be02a8cd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,7 @@ --- kind: pipeline type: docker -name: install-dependencies-php7.1 +name: install-dependencies-php7.2 platform: os: linux @@ -30,7 +30,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -38,7 +38,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -46,7 +46,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -168,12 +168,12 @@ trigger: - refs/heads/master depends_on: -- install-dependencies-php7.1 +- install-dependencies-php7.2 --- kind: pipeline type: docker -name: phpstan-php7.1 +name: phpstan-php7.2 platform: os: linux @@ -202,7 +202,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -210,7 +210,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -218,7 +218,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -228,7 +228,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -242,7 +242,7 @@ steps: - name: php-phpstan pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make test-php-phpstan @@ -253,92 +253,7 @@ trigger: - refs/heads/master depends_on: -- install-dependencies-php7.1 - ---- -kind: pipeline -type: docker -name: phan-php7.1 - -platform: - os: linux - arch: amd64 - -workspace: - base: /drone - path: src - -steps: -- name: cache-restore - pull: always - image: plugins/s3-cache:1 - settings: - access_key: - from_secret: cache_s3_access_key - endpoint: - from_secret: cache_s3_endpoint - restore: true - secret_key: - from_secret: cache_s3_secret_key - when: - instance: - - drone.owncloud.services - - drone.owncloud.com - -- name: composer-install - pull: always - image: owncloudci/php:7.1 - commands: - - make install-composer-deps - environment: - COMPOSER_HOME: /drone/src/.cache/composer - -- name: vendorbin-install - pull: always - image: owncloudci/php:7.1 - commands: - - make vendor-bin-deps - environment: - COMPOSER_HOME: /drone/src/.cache/composer - -- name: yarn-install - pull: always - image: owncloudci/php:7.1 - commands: - - make install-nodejs-deps - environment: - NPM_CONFIG_CACHE: /drone/src/.cache/npm - YARN_CACHE_FOLDER: /drone/src/.cache/yarn - bower_storage__packages: /drone/src/.cache/bower - -- name: install-server - pull: always - image: owncloudci/php:7.1 - commands: - - bash tests/drone/install-server.sh - - php occ a:l - - php occ config:system:set trusted_domains 1 --value=server - - php occ log:manage --level 2 - - php occ config:list - - php occ security:certificates:import /drone/server.crt - - php occ security:certificates - environment: - DB_TYPE: sqlite - -- name: phan - pull: always - image: owncloudci/php:7.1 - commands: - - make test-php-phan - -trigger: - ref: - - refs/pull/** - - refs/tags/** - - refs/heads/master - -depends_on: -- install-dependencies-php7.1 +- install-dependencies-php7.2 --- kind: pipeline @@ -423,7 +338,7 @@ trigger: - refs/heads/master depends_on: -- install-dependencies-php7.1 +- install-dependencies-php7.2 --- kind: pipeline @@ -508,7 +423,7 @@ trigger: - refs/heads/master depends_on: -- install-dependencies-php7.1 +- install-dependencies-php7.2 --- kind: pipeline @@ -542,7 +457,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -550,7 +465,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -558,7 +473,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -568,7 +483,7 @@ steps: - name: test-js pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make test-js @@ -598,15 +513,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: litmus-php7.1 +name: litmus-php7.2 platform: os: linux @@ -635,7 +549,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -643,7 +557,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -651,7 +565,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -661,7 +575,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -675,13 +589,13 @@ steps: - name: tech-preview pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - php occ config:system:set dav.enable.tech_preview --value=true --type boolean - name: setup-storage pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - mkdir -p /drone/src/work/local_storage - php occ app:enable files_external @@ -694,13 +608,13 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src - name: create-share pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - curl -k -s -u user1:123456 -X MKCOL "https://server/remote.php/webdav/new_folder" - curl -k -s -u user1:123456 "https://server/ocs/v2.php/apps/files_sharing/api/v1/shares" --data "path=/new_folder&shareType=0&permissions=15&name=new_folder&shareWith=admin" @@ -810,7 +724,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -832,15 +746,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: caldav-new-php7.1 +name: caldav-new-php7.2 platform: os: linux @@ -869,7 +782,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -877,7 +790,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -885,7 +798,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -895,7 +808,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -909,13 +822,13 @@ steps: - name: dav-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash apps/dav/tests/ci/caldav/install.sh - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -928,7 +841,7 @@ steps: - name: dav-test pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash apps/dav/tests/ci/caldav/script.sh @@ -950,15 +863,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: caldav-old-php7.1 +name: caldav-old-php7.2 platform: os: linux @@ -987,7 +899,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -995,7 +907,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -1003,7 +915,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -1013,7 +925,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -1027,13 +939,13 @@ steps: - name: dav-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash apps/dav/tests/ci/caldav-old-endpoint/install.sh - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -1046,7 +958,7 @@ steps: - name: dav-test pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash apps/dav/tests/ci/caldav-old-endpoint/script.sh @@ -1068,15 +980,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: carddav-new-php7.1 +name: carddav-new-php7.2 platform: os: linux @@ -1105,7 +1016,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -1113,7 +1024,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -1121,7 +1032,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -1131,7 +1042,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -1145,13 +1056,13 @@ steps: - name: dav-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash apps/dav/tests/ci/carddav/install.sh - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -1164,7 +1075,7 @@ steps: - name: dav-test pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash apps/dav/tests/ci/carddav/script.sh @@ -1186,15 +1097,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: carddav-old-php7.1 +name: carddav-old-php7.2 platform: os: linux @@ -1223,7 +1133,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -1231,7 +1141,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -1239,7 +1149,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -1249,7 +1159,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -1263,13 +1173,13 @@ steps: - name: dav-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash apps/dav/tests/ci/carddav-old-endpoint/install.sh - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -1282,7 +1192,7 @@ steps: - name: dav-test pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash apps/dav/tests/ci/carddav-old-endpoint/script.sh @@ -1304,15 +1214,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-sqlite +name: phpunit-php7.2-sqlite platform: os: linux @@ -1341,7 +1250,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -1349,7 +1258,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -1357,7 +1266,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -1367,7 +1276,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -1381,7 +1290,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -1394,7 +1303,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - su-exec www-data bash tests/drone/test-phpunit.sh environment: @@ -1427,15 +1336,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-mariadb10.2 +name: phpunit-php7.2-mariadb10.2 platform: os: linux @@ -1464,7 +1372,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -1472,7 +1380,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -1480,7 +1388,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -1490,7 +1398,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -1504,7 +1412,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -1517,7 +1425,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - su-exec www-data bash tests/drone/test-phpunit.sh environment: @@ -1560,15 +1468,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-mariadb10.3 +name: phpunit-php7.2-mariadb10.3 platform: os: linux @@ -1597,7 +1504,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -1605,7 +1512,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -1613,7 +1520,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -1623,7 +1530,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -1637,7 +1544,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -1650,7 +1557,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - su-exec www-data bash tests/drone/test-phpunit.sh environment: @@ -1693,15 +1600,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-mysql5.5 +name: phpunit-php7.2-mysql5.5 platform: os: linux @@ -1730,7 +1636,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -1738,7 +1644,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -1746,7 +1652,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -1756,7 +1662,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -1770,7 +1676,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -1783,7 +1689,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - su-exec www-data bash tests/drone/test-phpunit.sh environment: @@ -1826,15 +1732,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-mysql5.7 +name: phpunit-php7.2-mysql5.7 platform: os: linux @@ -1863,7 +1768,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -1871,7 +1776,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -1879,7 +1784,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -1889,7 +1794,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -1903,7 +1808,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -1916,7 +1821,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - su-exec www-data bash tests/drone/test-phpunit.sh environment: @@ -1959,15 +1864,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-mysql8.0 +name: phpunit-php7.2-mysql8.0 platform: os: linux @@ -1996,7 +1900,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -2004,7 +1908,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -2012,7 +1916,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -2022,7 +1926,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -2036,7 +1940,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -2049,7 +1953,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - su-exec www-data bash tests/drone/test-phpunit.sh environment: @@ -2094,15 +1998,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-postgres9.4 +name: phpunit-php7.2-postgres9.4 platform: os: linux @@ -2131,7 +2034,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -2139,7 +2042,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -2147,7 +2050,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -2157,7 +2060,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -2171,7 +2074,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -2184,7 +2087,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - su-exec www-data bash tests/drone/test-phpunit.sh environment: @@ -2226,15 +2129,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-postgres10.3 +name: phpunit-php7.2-postgres10.3 platform: os: linux @@ -2263,7 +2165,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -2271,7 +2173,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -2279,7 +2181,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -2289,7 +2191,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -2303,7 +2205,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -2316,7 +2218,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - su-exec www-data bash tests/drone/test-phpunit.sh environment: @@ -2358,15 +2260,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-oracle +name: phpunit-php7.2-oracle platform: os: linux @@ -2395,7 +2296,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -2403,7 +2304,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -2411,7 +2312,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -2421,7 +2322,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -2435,7 +2336,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -2448,7 +2349,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - su-exec www-data bash tests/drone/test-phpunit.sh environment: @@ -2491,228 +2392,7 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 -- phan-php7.2 -- phan-php7.3 - ---- -kind: pipeline -type: docker -name: phpunit-php7.2-sqlite - -platform: - os: linux - arch: amd64 - -workspace: - base: /drone - path: src - -steps: -- name: cache-restore - pull: always - image: plugins/s3-cache:1 - settings: - access_key: - from_secret: cache_s3_access_key - endpoint: - from_secret: cache_s3_endpoint - restore: true - secret_key: - from_secret: cache_s3_secret_key - when: - instance: - - drone.owncloud.services - - drone.owncloud.com - -- name: composer-install - pull: always - image: owncloudci/php:7.2 - commands: - - make install-composer-deps - environment: - COMPOSER_HOME: /drone/src/.cache/composer - -- name: vendorbin-install - pull: always - image: owncloudci/php:7.2 - commands: - - make vendor-bin-deps - environment: - COMPOSER_HOME: /drone/src/.cache/composer - -- name: yarn-install - pull: always - image: owncloudci/php:7.2 - commands: - - make install-nodejs-deps - environment: - NPM_CONFIG_CACHE: /drone/src/.cache/npm - YARN_CACHE_FOLDER: /drone/src/.cache/yarn - bower_storage__packages: /drone/src/.cache/bower - -- name: install-server - pull: always - image: owncloudci/php:7.2 - commands: - - bash tests/drone/install-server.sh - - php occ a:l - - php occ config:system:set trusted_domains 1 --value=server - - php occ log:manage --level 2 - - php occ config:list - - php occ security:certificates:import /drone/server.crt - - php occ security:certificates - environment: - DB_TYPE: sqlite - -- name: fix-permissions - pull: always - image: owncloudci/php:7.2 - commands: - - chown -R www-data /drone/src - -- name: owncloud-log-server - pull: always - image: owncloud/ubuntu:18.04 - detach: true - commands: - - tail -f /drone/src/data/owncloud.log - -- name: phpunit-tests - pull: always - image: owncloudci/php:7.2 - commands: - - su-exec www-data bash tests/drone/test-phpunit.sh - environment: - COVERAGE: false - DB_TYPE: sqlite - -trigger: - ref: - - refs/pull/** - - refs/tags/** - - refs/heads/master - -depends_on: -- coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 -- phan-php7.2 -- phan-php7.3 - ---- -kind: pipeline -type: docker -name: phpunit-php7.2-mariadb10.2 - -platform: - os: linux - arch: amd64 - -workspace: - base: /drone - path: src - -steps: -- name: cache-restore - pull: always - image: plugins/s3-cache:1 - settings: - access_key: - from_secret: cache_s3_access_key - endpoint: - from_secret: cache_s3_endpoint - restore: true - secret_key: - from_secret: cache_s3_secret_key - when: - instance: - - drone.owncloud.services - - drone.owncloud.com - -- name: composer-install - pull: always - image: owncloudci/php:7.2 - commands: - - make install-composer-deps - environment: - COMPOSER_HOME: /drone/src/.cache/composer - -- name: vendorbin-install - pull: always - image: owncloudci/php:7.2 - commands: - - make vendor-bin-deps - environment: - COMPOSER_HOME: /drone/src/.cache/composer - -- name: yarn-install - pull: always - image: owncloudci/php:7.2 - commands: - - make install-nodejs-deps - environment: - NPM_CONFIG_CACHE: /drone/src/.cache/npm - YARN_CACHE_FOLDER: /drone/src/.cache/yarn - bower_storage__packages: /drone/src/.cache/bower - -- name: install-server - pull: always - image: owncloudci/php:7.2 - commands: - - bash tests/drone/install-server.sh - - php occ a:l - - php occ config:system:set trusted_domains 1 --value=server - - php occ log:manage --level 2 - - php occ config:list - - php occ security:certificates:import /drone/server.crt - - php occ security:certificates - environment: - DB_TYPE: mariadb - -- name: fix-permissions - pull: always - image: owncloudci/php:7.2 - commands: - - chown -R www-data /drone/src - -- name: owncloud-log-server - pull: always - image: owncloud/ubuntu:18.04 - detach: true - commands: - - tail -f /drone/src/data/owncloud.log - -- name: phpunit-tests - pull: always - image: owncloudci/php:7.2 - commands: - - su-exec www-data bash tests/drone/test-phpunit.sh - environment: - COVERAGE: false - DB_TYPE: mariadb - -services: -- name: mariadb - pull: always - image: mariadb:10.2 - environment: - MYSQL_DATABASE: owncloud - MYSQL_PASSWORD: owncloud - MYSQL_ROOT_PASSWORD: owncloud - MYSQL_USER: owncloud - -trigger: - ref: - - refs/pull/** - - refs/tags/** - - refs/heads/master - -depends_on: -- coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 @@ -2816,8 +2496,7 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 @@ -2931,15 +2610,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-sqlite-samba +name: phpunit-php7.2-sqlite-samba platform: os: linux @@ -2968,7 +2646,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -2976,7 +2654,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -2984,7 +2662,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -2994,7 +2672,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -3008,7 +2686,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -3021,7 +2699,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - ls -l /var/cache - mkdir /var/cache/samba @@ -3070,15 +2748,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-sqlite-windows +name: phpunit-php7.2-sqlite-windows platform: os: linux @@ -3107,7 +2784,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -3115,7 +2792,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -3123,7 +2800,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -3133,7 +2810,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -3147,7 +2824,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -3160,7 +2837,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - ls -l /var/cache - mkdir /var/cache/samba @@ -3198,15 +2875,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-sqlite-webdav +name: phpunit-php7.2-sqlite-webdav platform: os: linux @@ -3235,7 +2911,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -3243,7 +2919,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -3251,7 +2927,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -3261,7 +2937,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -3275,7 +2951,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -3288,7 +2964,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - su-exec www-data bash tests/drone/test-phpunit.sh environment: @@ -3333,15 +3009,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-sqlite-sftp +name: phpunit-php7.2-sqlite-sftp platform: os: linux @@ -3370,7 +3045,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -3378,7 +3053,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -3386,7 +3061,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -3396,7 +3071,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -3410,7 +3085,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -3423,7 +3098,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - su-exec www-data bash tests/drone/test-phpunit.sh environment: @@ -3464,15 +3139,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: phpunit-php7.1-sqlite-scality +name: phpunit-php7.2-sqlite-scality platform: os: linux @@ -3501,7 +3175,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -3509,7 +3183,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -3517,7 +3191,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -3527,7 +3201,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -3541,7 +3215,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/files_primary_s3.git /drone/src/apps/files_primary_s3 - cd /drone/src/apps/files_primary_s3 @@ -3553,7 +3227,7 @@ steps: - name: setup-scality pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - wait-for-it -t 120 scality:8000 - cp /drone/src/apps/files_primary_s3/tests/drone/scality.config.php /drone/src/config @@ -3561,7 +3235,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -3574,7 +3248,7 @@ steps: - name: phpunit-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - su-exec www-data bash tests/drone/test-phpunit.sh environment: @@ -3615,15 +3289,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiAuth-mariadb10.2-php7.1 +name: apiAuth-mariadb10.2-php7.2 platform: os: linux @@ -3652,7 +3325,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -3660,7 +3333,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -3668,7 +3341,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -3678,7 +3351,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -3692,7 +3365,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -3704,7 +3377,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -3717,7 +3390,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -3739,7 +3412,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -3761,15 +3434,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiAuthOcs-mariadb10.2-php7.1 +name: apiAuthOcs-mariadb10.2-php7.2 platform: os: linux @@ -3798,7 +3470,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -3806,7 +3478,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -3814,7 +3486,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -3824,7 +3496,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -3838,7 +3510,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -3850,7 +3522,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -3863,7 +3535,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -3885,7 +3557,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -3907,15 +3579,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiCapabilities-mariadb10.2-php7.1 +name: apiCapabilities-mariadb10.2-php7.2 platform: os: linux @@ -3944,7 +3615,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -3952,7 +3623,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -3960,7 +3631,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -3970,7 +3641,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -3984,7 +3655,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -3996,7 +3667,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -4009,7 +3680,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -4031,7 +3702,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -4053,15 +3724,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiComments-mariadb10.2-php7.1 +name: apiComments-mariadb10.2-php7.2 platform: os: linux @@ -4090,7 +3760,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -4098,7 +3768,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -4106,7 +3776,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -4116,7 +3786,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -4130,7 +3800,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -4142,7 +3812,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -4155,7 +3825,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -4177,7 +3847,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -4199,15 +3869,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiFavorites-mariadb10.2-php7.1 +name: apiFavorites-mariadb10.2-php7.2 platform: os: linux @@ -4236,7 +3905,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -4244,7 +3913,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -4252,7 +3921,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -4262,7 +3931,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -4276,7 +3945,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -4288,7 +3957,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -4301,7 +3970,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -4323,7 +3992,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -4345,15 +4014,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiMain-mariadb10.2-php7.1 +name: apiMain-mariadb10.2-php7.2 platform: os: linux @@ -4382,7 +4050,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -4390,7 +4058,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -4398,7 +4066,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -4408,7 +4076,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -4422,7 +4090,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -4434,7 +4102,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -4447,7 +4115,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -4469,7 +4137,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -4491,15 +4159,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiProvisioning-v1-mariadb10.2-php7.1 +name: apiProvisioning-v1-mariadb10.2-php7.2 platform: os: linux @@ -4528,7 +4195,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -4536,7 +4203,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -4544,7 +4211,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -4554,7 +4221,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -4568,7 +4235,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -4580,7 +4247,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -4593,7 +4260,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -4615,7 +4282,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -4637,15 +4304,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiProvisioning-v2-mariadb10.2-php7.1 +name: apiProvisioning-v2-mariadb10.2-php7.2 platform: os: linux @@ -4674,7 +4340,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -4682,7 +4348,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -4690,7 +4356,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -4700,7 +4366,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -4714,7 +4380,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -4726,7 +4392,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -4739,7 +4405,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -4761,7 +4427,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -4783,15 +4449,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiProvisioningGroups-v1-mariadb10.2-php7.1 +name: apiProvisioningGroups-v1-mariadb10.2-php7.2 platform: os: linux @@ -4820,7 +4485,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -4828,7 +4493,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -4836,7 +4501,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -4846,7 +4511,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -4860,7 +4525,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -4872,7 +4537,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -4885,7 +4550,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -4907,7 +4572,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -4929,15 +4594,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiProvisioningGroups-v2-mariadb10.2-php7.1 +name: apiProvisioningGroups-v2-mariadb10.2-php7.2 platform: os: linux @@ -4966,7 +4630,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -4974,7 +4638,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -4982,7 +4646,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -4992,7 +4656,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -5006,7 +4670,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -5018,7 +4682,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -5031,7 +4695,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -5053,7 +4717,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -5075,15 +4739,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiSharees-mariadb10.2-php7.1 +name: apiSharees-mariadb10.2-php7.2 platform: os: linux @@ -5112,7 +4775,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -5120,7 +4783,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -5128,7 +4791,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -5138,7 +4801,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -5152,7 +4815,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -5164,7 +4827,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -5177,7 +4840,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -5199,7 +4862,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -5221,15 +4884,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiShareManagement-mariadb10.2-php7.1 +name: apiShareManagement-mariadb10.2-php7.2 platform: os: linux @@ -5258,7 +4920,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -5266,7 +4928,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -5274,7 +4936,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -5284,7 +4946,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -5298,7 +4960,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -5310,7 +4972,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -5323,7 +4985,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -5345,7 +5007,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -5367,15 +5029,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiShareManagementBasic-mariadb10.2-php7.1 +name: apiShareManagementBasic-mariadb10.2-php7.2 platform: os: linux @@ -5404,7 +5065,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -5412,7 +5073,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -5420,7 +5081,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -5430,7 +5091,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -5444,7 +5105,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -5456,7 +5117,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -5469,7 +5130,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -5491,7 +5152,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -5513,15 +5174,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiShareOperations-mariadb10.2-php7.1 +name: apiShareOperations-mariadb10.2-php7.2 platform: os: linux @@ -5550,7 +5210,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -5558,7 +5218,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -5566,7 +5226,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -5576,7 +5236,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -5590,7 +5250,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -5602,7 +5262,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -5615,7 +5275,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -5637,7 +5297,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -5659,15 +5319,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiShareReshare-mariadb10.2-php7.1 +name: apiShareReshare-mariadb10.2-php7.2 platform: os: linux @@ -5696,7 +5355,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -5704,7 +5363,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -5712,7 +5371,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -5722,7 +5381,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -5736,7 +5395,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -5748,7 +5407,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -5761,7 +5420,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -5783,7 +5442,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -5805,15 +5464,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiShareUpdate-mariadb10.2-php7.1 +name: apiShareUpdate-mariadb10.2-php7.2 platform: os: linux @@ -5842,7 +5500,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -5850,7 +5508,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -5858,7 +5516,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -5868,7 +5526,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -5882,7 +5540,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -5894,7 +5552,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -5907,7 +5565,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -5929,7 +5587,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -5951,15 +5609,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiTags-mariadb10.2-php7.1 +name: apiTags-mariadb10.2-php7.2 platform: os: linux @@ -5988,7 +5645,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -5996,7 +5653,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -6004,7 +5661,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -6014,7 +5671,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -6028,7 +5685,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -6040,7 +5697,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -6053,7 +5710,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -6075,7 +5732,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -6097,15 +5754,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiTrashbin-mariadb10.2-php7.1 +name: apiTrashbin-mariadb10.2-php7.2 platform: os: linux @@ -6134,7 +5790,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -6142,7 +5798,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -6150,7 +5806,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -6160,7 +5816,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -6174,7 +5830,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -6186,7 +5842,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -6199,7 +5855,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -6221,7 +5877,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -6243,15 +5899,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiVersions-mariadb10.2-php7.1 +name: apiVersions-mariadb10.2-php7.2 platform: os: linux @@ -6280,7 +5935,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -6288,7 +5943,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -6296,7 +5951,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -6306,7 +5961,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -6320,7 +5975,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -6332,7 +5987,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -6345,7 +6000,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -6367,7 +6022,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -6389,15 +6044,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiWebdavLocks-mariadb10.2-php7.1 +name: apiWebdavLocks-mariadb10.2-php7.2 platform: os: linux @@ -6426,7 +6080,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -6434,7 +6088,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -6442,7 +6096,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -6452,7 +6106,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -6466,7 +6120,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -6478,7 +6132,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -6491,7 +6145,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -6513,7 +6167,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -6535,15 +6189,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiWebdavLocks2-mariadb10.2-php7.1 +name: apiWebdavLocks2-mariadb10.2-php7.2 platform: os: linux @@ -6572,7 +6225,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -6580,7 +6233,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -6588,7 +6241,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -6598,7 +6251,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -6612,7 +6265,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -6624,7 +6277,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -6637,7 +6290,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -6659,7 +6312,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -6681,15 +6334,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiWebdavMove-mariadb10.2-php7.1 +name: apiWebdavMove-mariadb10.2-php7.2 platform: os: linux @@ -6718,7 +6370,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -6726,7 +6378,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -6734,7 +6386,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -6744,7 +6396,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -6758,7 +6410,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -6770,7 +6422,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -6783,7 +6435,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -6805,7 +6457,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -6827,15 +6479,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiWebdavOperations-mariadb10.2-php7.1 +name: apiWebdavOperations-mariadb10.2-php7.2 platform: os: linux @@ -6864,7 +6515,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -6872,7 +6523,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -6880,7 +6531,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -6890,7 +6541,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -6904,7 +6555,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -6916,7 +6567,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -6929,7 +6580,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -6951,7 +6602,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -6973,15 +6624,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiWebdavProperties-mariadb10.2-php7.1 +name: apiWebdavProperties-mariadb10.2-php7.2 platform: os: linux @@ -7010,7 +6660,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -7018,7 +6668,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -7026,7 +6676,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -7036,7 +6686,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -7050,7 +6700,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -7062,7 +6712,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -7075,7 +6725,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -7097,7 +6747,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -7119,15 +6769,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiWebdavUpload-mariadb10.2-php7.1 +name: apiWebdavUpload-mariadb10.2-php7.2 platform: os: linux @@ -7156,7 +6805,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -7164,7 +6813,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -7172,7 +6821,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -7182,7 +6831,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -7196,7 +6845,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -7208,7 +6857,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -7221,7 +6870,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -7243,7 +6892,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -7265,15 +6914,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiSharingNotifications-mariadb10.2-php7.1 +name: apiSharingNotifications-mariadb10.2-php7.2 platform: os: linux @@ -7302,7 +6950,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -7310,7 +6958,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -7318,7 +6966,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -7328,7 +6976,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -7342,7 +6990,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -7361,7 +7009,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -7374,7 +7022,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -7396,7 +7044,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -7418,15 +7066,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiFederation-master-mariadb10.2-php7.1 +name: apiFederation-master-mariadb10.2-php7.2 platform: os: linux @@ -7455,7 +7102,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -7463,7 +7110,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -7471,7 +7118,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -7481,7 +7128,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -7504,7 +7151,7 @@ steps: - name: configure-federated pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - cd /drone/federated - php occ a:l @@ -7528,7 +7175,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -7540,7 +7187,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src - chown -R www-data /drone/federated @@ -7554,7 +7201,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -7576,7 +7223,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -7592,7 +7239,7 @@ services: - name: federated pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -7614,15 +7261,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiFederation-10.2.1-mariadb10.2-php7.1 +name: apiFederation-10.2.1-mariadb10.2-php7.2 platform: os: linux @@ -7651,7 +7297,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -7659,7 +7305,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -7667,7 +7313,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -7677,7 +7323,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -7700,7 +7346,7 @@ steps: - name: configure-federated pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - cd /drone/federated - php occ a:l @@ -7724,7 +7370,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -7736,7 +7382,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src - chown -R www-data /drone/federated @@ -7750,7 +7396,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -7772,7 +7418,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -7788,7 +7434,7 @@ services: - name: federated pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -7810,15 +7456,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: cliBackground-mariadb10.2-php7.1 +name: cliBackground-mariadb10.2-php7.2 platform: os: linux @@ -7847,7 +7492,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -7855,7 +7500,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -7863,7 +7508,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -7873,7 +7518,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -7887,7 +7532,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -7899,7 +7544,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -7912,7 +7557,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -7939,7 +7584,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -7961,15 +7606,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: cliMain-mariadb10.2-php7.1 +name: cliMain-mariadb10.2-php7.2 platform: os: linux @@ -7998,7 +7642,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -8006,7 +7650,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -8014,7 +7658,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -8024,7 +7668,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -8038,7 +7682,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -8050,7 +7694,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -8063,7 +7707,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -8090,7 +7734,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -8112,15 +7756,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: cliProvisioning-mariadb10.2-php7.1 +name: cliProvisioning-mariadb10.2-php7.2 platform: os: linux @@ -8149,7 +7792,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -8157,7 +7800,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -8165,7 +7808,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -8175,7 +7818,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -8189,7 +7832,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -8201,7 +7844,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -8214,7 +7857,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -8241,7 +7884,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -8263,15 +7906,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: cliTrashbin-mariadb10.2-php7.1 +name: cliTrashbin-mariadb10.2-php7.2 platform: os: linux @@ -8300,7 +7942,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -8308,7 +7950,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -8316,7 +7958,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -8326,7 +7968,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -8340,7 +7982,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -8352,7 +7994,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -8365,7 +8007,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -8392,7 +8034,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -8414,15 +8056,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: cliAppManagement-mariadb10.2-php7.1 +name: cliAppManagement-mariadb10.2-php7.2 platform: os: linux @@ -8451,7 +8092,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -8459,7 +8100,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -8467,7 +8108,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -8477,7 +8118,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -8491,7 +8132,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -8503,7 +8144,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -8516,7 +8157,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -8538,7 +8179,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -8560,15 +8201,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIAddUsers-chrome-mariadb10.2-php7.1 +name: webUIAddUsers-chrome-mariadb10.2-php7.2 platform: os: linux @@ -8597,7 +8237,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -8605,7 +8245,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -8613,7 +8253,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -8623,7 +8263,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -8637,7 +8277,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -8649,7 +8289,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -8662,7 +8302,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -8699,7 +8339,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -8717,15 +8357,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIAdminSettings-chrome-mariadb10.2-php7.1 +name: webUIAdminSettings-chrome-mariadb10.2-php7.2 platform: os: linux @@ -8754,7 +8393,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -8762,7 +8401,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -8770,7 +8409,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -8780,7 +8419,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -8794,7 +8433,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -8806,7 +8445,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -8819,7 +8458,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -8856,7 +8495,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -8874,15 +8513,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIComments-chrome-mariadb10.2-php7.1 +name: webUIComments-chrome-mariadb10.2-php7.2 platform: os: linux @@ -8911,7 +8549,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -8919,7 +8557,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -8927,7 +8565,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -8937,7 +8575,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -8951,7 +8589,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -8963,7 +8601,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -8976,7 +8614,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -9013,7 +8651,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -9031,15 +8669,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUICreateDelete-chrome-mariadb10.2-php7.1 +name: webUICreateDelete-chrome-mariadb10.2-php7.2 platform: os: linux @@ -9068,7 +8705,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -9076,7 +8713,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -9084,7 +8721,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -9094,7 +8731,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -9108,7 +8745,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -9120,7 +8757,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -9133,7 +8770,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -9170,7 +8807,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -9188,15 +8825,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIFavorites-chrome-mariadb10.2-php7.1 +name: webUIFavorites-chrome-mariadb10.2-php7.2 platform: os: linux @@ -9225,7 +8861,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -9233,7 +8869,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -9241,7 +8877,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -9251,7 +8887,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -9265,7 +8901,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -9277,7 +8913,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -9290,7 +8926,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -9327,7 +8963,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -9345,15 +8981,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIFiles-chrome-mariadb10.2-php7.1 +name: webUIFiles-chrome-mariadb10.2-php7.2 platform: os: linux @@ -9382,7 +9017,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -9390,7 +9025,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -9398,7 +9033,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -9408,7 +9043,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -9422,7 +9057,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -9434,7 +9069,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -9447,7 +9082,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -9484,7 +9119,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -9502,15 +9137,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUILogin-chrome-mariadb10.2-php7.1 +name: webUILogin-chrome-mariadb10.2-php7.2 platform: os: linux @@ -9539,7 +9173,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -9547,7 +9181,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -9555,7 +9189,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -9565,7 +9199,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -9579,7 +9213,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -9591,7 +9225,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -9604,7 +9238,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -9641,7 +9275,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -9659,15 +9293,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIManageQuota-chrome-mariadb10.2-php7.1 +name: webUIManageQuota-chrome-mariadb10.2-php7.2 platform: os: linux @@ -9696,7 +9329,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -9704,7 +9337,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -9712,7 +9345,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -9722,7 +9355,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -9736,7 +9369,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -9748,7 +9381,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -9761,7 +9394,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -9798,7 +9431,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -9816,15 +9449,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIManageUsersGrps-chrome-mariadb10.2-php7.1 +name: webUIManageUsersGrps-chrome-mariadb10.2-php7.2 platform: os: linux @@ -9853,7 +9485,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -9861,7 +9493,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -9869,7 +9501,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -9879,7 +9511,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -9893,7 +9525,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -9905,7 +9537,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -9918,7 +9550,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -9955,7 +9587,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -9973,15 +9605,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIMoveFilesFolder-chrome-mariadb10.2-php7.1 +name: webUIMoveFilesFolder-chrome-mariadb10.2-php7.2 platform: os: linux @@ -10010,7 +9641,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -10018,7 +9649,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -10026,7 +9657,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -10036,7 +9667,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -10050,7 +9681,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -10062,7 +9693,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -10075,7 +9706,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -10112,7 +9743,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -10130,15 +9761,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIPersonalSetting-chrome-mariadb10.2-php7.1 +name: webUIPersonalSetting-chrome-mariadb10.2-php7.2 platform: os: linux @@ -10167,7 +9797,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -10175,7 +9805,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -10183,7 +9813,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -10193,7 +9823,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -10207,7 +9837,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -10219,7 +9849,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -10232,7 +9862,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -10269,7 +9899,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -10287,15 +9917,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIRenameFiles-chrome-mariadb10.2-php7.1 +name: webUIRenameFiles-chrome-mariadb10.2-php7.2 platform: os: linux @@ -10324,7 +9953,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -10332,7 +9961,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -10340,7 +9969,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -10350,7 +9979,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -10364,7 +9993,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -10376,7 +10005,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -10389,7 +10018,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -10426,7 +10055,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -10444,15 +10073,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIRenameFolders-chrome-mariadb10.2-php7.1 +name: webUIRenameFolders-chrome-mariadb10.2-php7.2 platform: os: linux @@ -10481,7 +10109,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -10489,7 +10117,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -10497,7 +10125,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -10507,7 +10135,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -10521,7 +10149,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -10533,7 +10161,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -10546,7 +10174,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -10583,7 +10211,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -10601,15 +10229,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIRestrictSharing-chrome-mariadb10.2-php7.1 +name: webUIRestrictSharing-chrome-mariadb10.2-php7.2 platform: os: linux @@ -10638,7 +10265,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -10646,7 +10273,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -10654,7 +10281,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -10664,7 +10291,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -10678,7 +10305,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -10690,7 +10317,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -10703,7 +10330,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -10740,7 +10367,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -10758,15 +10385,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUISettingsMenu-chrome-mariadb10.2-php7.1 +name: webUISettingsMenu-chrome-mariadb10.2-php7.2 platform: os: linux @@ -10795,7 +10421,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -10803,7 +10429,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -10811,7 +10437,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -10821,7 +10447,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -10835,7 +10461,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -10847,7 +10473,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -10860,7 +10486,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -10897,7 +10523,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -10915,15 +10541,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUISharingAcceptSh-chrome-mariadb10.2-php7.1 +name: webUISharingAcceptSh-chrome-mariadb10.2-php7.2 platform: os: linux @@ -10952,7 +10577,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -10960,7 +10585,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -10968,7 +10593,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -10978,7 +10603,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -10992,7 +10617,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -11004,7 +10629,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -11017,7 +10642,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -11054,7 +10679,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -11072,15 +10697,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUISharingAutocomp-chrome-mariadb10.2-php7.1 +name: webUISharingAutocomp-chrome-mariadb10.2-php7.2 platform: os: linux @@ -11109,7 +10733,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -11117,7 +10741,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -11125,7 +10749,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -11135,7 +10759,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -11149,7 +10773,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -11161,7 +10785,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -11174,7 +10798,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -11211,7 +10835,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -11229,15 +10853,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUISharingIntGroup-chrome-mariadb10.2-php7.1 +name: webUISharingIntGroup-chrome-mariadb10.2-php7.2 platform: os: linux @@ -11266,7 +10889,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -11274,7 +10897,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -11282,7 +10905,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -11292,7 +10915,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -11306,7 +10929,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -11318,7 +10941,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -11331,7 +10954,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -11368,7 +10991,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -11386,15 +11009,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUISharingIntUsers-chrome-mariadb10.2-php7.1 +name: webUISharingIntUsers-chrome-mariadb10.2-php7.2 platform: os: linux @@ -11423,7 +11045,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -11431,7 +11053,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -11439,7 +11061,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -11449,7 +11071,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -11463,7 +11085,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -11475,7 +11097,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -11488,7 +11110,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -11525,7 +11147,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -11543,15 +11165,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUISharingPublic-chrome-mariadb10.2-php7.1 +name: webUISharingPublic-chrome-mariadb10.2-php7.2 platform: os: linux @@ -11580,7 +11201,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -11588,7 +11209,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -11596,7 +11217,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -11606,7 +11227,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -11620,7 +11241,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -11632,7 +11253,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -11645,7 +11266,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -11682,7 +11303,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -11700,15 +11321,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUITags-chrome-mariadb10.2-php7.1 +name: webUITags-chrome-mariadb10.2-php7.2 platform: os: linux @@ -11737,7 +11357,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -11745,7 +11365,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -11753,7 +11373,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -11763,7 +11383,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -11777,7 +11397,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -11789,7 +11409,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -11802,7 +11422,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -11839,7 +11459,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -11857,15 +11477,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUITrashbin-chrome-mariadb10.2-php7.1 +name: webUITrashbin-chrome-mariadb10.2-php7.2 platform: os: linux @@ -11894,7 +11513,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -11902,7 +11521,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -11910,7 +11529,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -11920,7 +11539,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -11934,7 +11553,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -11946,7 +11565,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -11959,7 +11578,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -11996,7 +11615,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -12014,15 +11633,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIUpload-chrome-mariadb10.2-php7.1 +name: webUIUpload-chrome-mariadb10.2-php7.2 platform: os: linux @@ -12051,7 +11669,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -12059,7 +11677,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -12067,7 +11685,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -12077,7 +11695,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -12091,7 +11709,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -12103,7 +11721,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -12116,7 +11734,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -12153,7 +11771,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -12171,15 +11789,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIWebdavLockProt-chrome-mariadb10.2-php7.1 +name: webUIWebdavLockProt-chrome-mariadb10.2-php7.2 platform: os: linux @@ -12208,7 +11825,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -12216,7 +11833,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -12224,7 +11841,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -12234,7 +11851,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -12248,7 +11865,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -12260,7 +11877,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -12273,7 +11890,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -12310,7 +11927,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -12328,15 +11945,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIWebdavLocks-chrome-mariadb10.2-php7.1 +name: webUIWebdavLocks-chrome-mariadb10.2-php7.2 platform: os: linux @@ -12365,7 +11981,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -12373,7 +11989,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -12381,7 +11997,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -12391,7 +12007,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -12405,7 +12021,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -12417,7 +12033,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -12430,7 +12046,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -12467,7 +12083,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -12485,15 +12101,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUISharingNotify-chrome-mariadb10.2-php7.1 +name: webUISharingNotify-chrome-mariadb10.2-php7.2 platform: os: linux @@ -12522,7 +12137,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -12530,7 +12145,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -12538,7 +12153,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -12548,7 +12163,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -12562,7 +12177,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -12581,7 +12196,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -12594,7 +12209,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -12631,7 +12246,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -12649,15 +12264,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUISharingExt-master-chrome-mariadb10.2-php7.1 +name: webUISharingExt-master-chrome-mariadb10.2-php7.2 platform: os: linux @@ -12686,7 +12300,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -12694,7 +12308,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -12702,7 +12316,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -12712,7 +12326,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -12735,7 +12349,7 @@ steps: - name: configure-federated pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - cd /drone/federated - php occ a:l @@ -12759,7 +12373,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -12771,7 +12385,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src - chown -R www-data /drone/federated @@ -12785,7 +12399,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -12817,7 +12431,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -12833,7 +12447,7 @@ services: - name: federated pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -12855,15 +12469,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUISharingExt-10.2.1-chrome-mariadb10.2-php7.1 +name: webUISharingExt-10.2.1-chrome-mariadb10.2-php7.2 platform: os: linux @@ -12892,7 +12505,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -12900,7 +12513,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -12908,7 +12521,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -12918,7 +12531,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -12941,7 +12554,7 @@ steps: - name: configure-federated pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - cd /drone/federated - php occ a:l @@ -12965,7 +12578,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -12977,7 +12590,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src - chown -R www-data /drone/federated @@ -12991,7 +12604,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -13023,7 +12636,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -13039,7 +12652,7 @@ services: - name: federated pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -13061,15 +12674,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIFfSmoke-3-1-firefox-mariadb10.2-php7.1 +name: webUIFfSmoke-3-1-firefox-mariadb10.2-php7.2 platform: os: linux @@ -13098,7 +12710,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -13106,7 +12718,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -13114,7 +12726,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -13124,7 +12736,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -13138,7 +12750,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -13150,7 +12762,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -13163,7 +12775,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -13203,7 +12815,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -13221,15 +12833,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIFfSmoke-3-2-firefox-mariadb10.2-php7.1 +name: webUIFfSmoke-3-2-firefox-mariadb10.2-php7.2 platform: os: linux @@ -13258,7 +12869,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -13266,7 +12877,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -13274,7 +12885,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -13284,7 +12895,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -13298,7 +12909,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -13310,7 +12921,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -13323,7 +12934,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -13363,7 +12974,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -13381,15 +12992,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIFfSmoke-3-3-firefox-mariadb10.2-php7.1 +name: webUIFfSmoke-3-3-firefox-mariadb10.2-php7.2 platform: os: linux @@ -13418,7 +13028,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -13426,7 +13036,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -13434,7 +13044,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -13444,7 +13054,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -13458,7 +13068,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -13470,7 +13080,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -13483,7 +13093,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -13523,7 +13133,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -13541,15 +13151,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIProxySmoke-3-1-chrome-mariadb10.2-php7.1 +name: webUIProxySmoke-3-1-chrome-mariadb10.2-php7.2 platform: os: linux @@ -13578,7 +13187,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -13586,7 +13195,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -13594,7 +13203,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -13604,7 +13213,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -13619,7 +13228,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -13631,7 +13240,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -13644,7 +13253,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -13689,7 +13298,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -13707,15 +13316,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIProxySmoke-3-2-chrome-mariadb10.2-php7.1 +name: webUIProxySmoke-3-2-chrome-mariadb10.2-php7.2 platform: os: linux @@ -13744,7 +13352,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -13752,7 +13360,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -13760,7 +13368,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -13770,7 +13378,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -13785,7 +13393,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -13797,7 +13405,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -13810,7 +13418,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -13855,7 +13463,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -13873,15 +13481,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: webUIProxySmoke-3-3-chrome-mariadb10.2-php7.1 +name: webUIProxySmoke-3-3-chrome-mariadb10.2-php7.2 platform: os: linux @@ -13910,7 +13517,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -13918,7 +13525,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -13926,7 +13533,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -13936,7 +13543,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -13951,7 +13558,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -13963,7 +13570,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -13976,7 +13583,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -14021,7 +13628,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -14039,15 +13646,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiProxySmoke-3-1-mariadb10.2-php7.1 +name: apiProxySmoke-3-1-mariadb10.2-php7.2 platform: os: linux @@ -14076,7 +13682,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -14084,7 +13690,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -14092,7 +13698,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -14102,7 +13708,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -14117,7 +13723,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -14129,7 +13735,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -14142,7 +13748,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -14172,7 +13778,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -14190,15 +13796,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiProxySmoke-3-2-mariadb10.2-php7.1 +name: apiProxySmoke-3-2-mariadb10.2-php7.2 platform: os: linux @@ -14227,7 +13832,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -14235,7 +13840,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -14243,7 +13848,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -14253,7 +13858,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -14268,7 +13873,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -14280,7 +13885,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -14293,7 +13898,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -14323,7 +13928,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -14341,15 +13946,14 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 --- kind: pipeline type: docker -name: apiProxySmoke-3-3-mariadb10.2-php7.1 +name: apiProxySmoke-3-3-mariadb10.2-php7.2 platform: os: linux @@ -14378,7 +13982,7 @@ steps: - name: composer-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-composer-deps environment: @@ -14386,7 +13990,7 @@ steps: - name: vendorbin-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make vendor-bin-deps environment: @@ -14394,7 +13998,7 @@ steps: - name: yarn-install pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - make install-nodejs-deps environment: @@ -14404,7 +14008,7 @@ steps: - name: install-server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - bash tests/drone/install-server.sh - php occ a:l @@ -14419,7 +14023,7 @@ steps: - name: install-extra-apps pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - git clone https://github.com/owncloud/testing.git /drone/src/apps/testing - cd /drone/src/apps/testing @@ -14431,7 +14035,7 @@ steps: - name: fix-permissions pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - chown -R www-data /drone/src @@ -14444,7 +14048,7 @@ steps: - name: acceptance-tests pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 commands: - touch /drone/saved-settings.sh - . /drone/saved-settings.sh @@ -14474,7 +14078,7 @@ services: - name: server pull: always - image: owncloudci/php:7.1 + image: owncloudci/php:7.2 command: - /usr/local/bin/apachectl - -e @@ -14492,8 +14096,7 @@ trigger: depends_on: - coding-standard-php7.3 -- phpstan-php7.1 -- phan-php7.1 +- phpstan-php7.2 - phan-php7.2 - phan-php7.3 @@ -14528,98 +14131,96 @@ trigger: depends_on: - test-javascript -- litmus-php7.1 -- caldav-new-php7.1 -- caldav-old-php7.1 -- carddav-new-php7.1 -- carddav-old-php7.1 -- phpunit-php7.1-sqlite -- phpunit-php7.1-mariadb10.2 -- phpunit-php7.1-mariadb10.3 -- phpunit-php7.1-mysql5.5 -- phpunit-php7.1-mysql5.7 -- phpunit-php7.1-mysql8.0 -- phpunit-php7.1-postgres9.4 -- phpunit-php7.1-postgres10.3 -- phpunit-php7.1-oracle +- litmus-php7.2 +- caldav-new-php7.2 +- caldav-old-php7.2 +- carddav-new-php7.2 +- carddav-old-php7.2 - phpunit-php7.2-sqlite - phpunit-php7.2-mariadb10.2 +- phpunit-php7.2-mariadb10.3 +- phpunit-php7.2-mysql5.5 +- phpunit-php7.2-mysql5.7 +- phpunit-php7.2-mysql8.0 +- phpunit-php7.2-postgres9.4 +- phpunit-php7.2-postgres10.3 +- phpunit-php7.2-oracle - phpunit-php7.3-sqlite - phpunit-php7.3-mariadb10.2 -- phpunit-php7.1-sqlite-samba -- phpunit-php7.1-sqlite-windows -- phpunit-php7.1-sqlite-webdav -- phpunit-php7.1-sqlite-sftp -- phpunit-php7.1-sqlite-scality -- apiAuth-mariadb10.2-php7.1 -- apiAuthOcs-mariadb10.2-php7.1 -- apiCapabilities-mariadb10.2-php7.1 -- apiComments-mariadb10.2-php7.1 -- apiFavorites-mariadb10.2-php7.1 -- apiMain-mariadb10.2-php7.1 -- apiProvisioning-v1-mariadb10.2-php7.1 -- apiProvisioning-v2-mariadb10.2-php7.1 -- apiProvisioningGroups-v1-mariadb10.2-php7.1 -- apiProvisioningGroups-v2-mariadb10.2-php7.1 -- apiSharees-mariadb10.2-php7.1 -- apiShareManagement-mariadb10.2-php7.1 -- apiShareManagementBasic-mariadb10.2-php7.1 -- apiShareOperations-mariadb10.2-php7.1 -- apiShareReshare-mariadb10.2-php7.1 -- apiShareUpdate-mariadb10.2-php7.1 -- apiTags-mariadb10.2-php7.1 -- apiTrashbin-mariadb10.2-php7.1 -- apiVersions-mariadb10.2-php7.1 -- apiWebdavLocks-mariadb10.2-php7.1 -- apiWebdavLocks2-mariadb10.2-php7.1 -- apiWebdavMove-mariadb10.2-php7.1 -- apiWebdavOperations-mariadb10.2-php7.1 -- apiWebdavProperties-mariadb10.2-php7.1 -- apiWebdavUpload-mariadb10.2-php7.1 -- apiSharingNotifications-mariadb10.2-php7.1 -- apiFederation-master-mariadb10.2-php7.1 -- apiFederation-10.2.1-mariadb10.2-php7.1 -- cliBackground-mariadb10.2-php7.1 -- cliMain-mariadb10.2-php7.1 -- cliProvisioning-mariadb10.2-php7.1 -- cliTrashbin-mariadb10.2-php7.1 -- cliAppManagement-mariadb10.2-php7.1 -- webUIAddUsers-chrome-mariadb10.2-php7.1 -- webUIAdminSettings-chrome-mariadb10.2-php7.1 -- webUIComments-chrome-mariadb10.2-php7.1 -- webUICreateDelete-chrome-mariadb10.2-php7.1 -- webUIFavorites-chrome-mariadb10.2-php7.1 -- webUIFiles-chrome-mariadb10.2-php7.1 -- webUILogin-chrome-mariadb10.2-php7.1 -- webUIManageQuota-chrome-mariadb10.2-php7.1 -- webUIManageUsersGrps-chrome-mariadb10.2-php7.1 -- webUIMoveFilesFolder-chrome-mariadb10.2-php7.1 -- webUIPersonalSetting-chrome-mariadb10.2-php7.1 -- webUIRenameFiles-chrome-mariadb10.2-php7.1 -- webUIRenameFolders-chrome-mariadb10.2-php7.1 -- webUIRestrictSharing-chrome-mariadb10.2-php7.1 -- webUISettingsMenu-chrome-mariadb10.2-php7.1 -- webUISharingAcceptSh-chrome-mariadb10.2-php7.1 -- webUISharingAutocomp-chrome-mariadb10.2-php7.1 -- webUISharingIntGroup-chrome-mariadb10.2-php7.1 -- webUISharingIntUsers-chrome-mariadb10.2-php7.1 -- webUISharingPublic-chrome-mariadb10.2-php7.1 -- webUITags-chrome-mariadb10.2-php7.1 -- webUITrashbin-chrome-mariadb10.2-php7.1 -- webUIUpload-chrome-mariadb10.2-php7.1 -- webUIWebdavLockProt-chrome-mariadb10.2-php7.1 -- webUIWebdavLocks-chrome-mariadb10.2-php7.1 -- webUISharingNotify-chrome-mariadb10.2-php7.1 -- webUISharingExt-master-chrome-mariadb10.2-php7.1 -- webUISharingExt-10.2.1-chrome-mariadb10.2-php7.1 -- webUIFfSmoke-3-1-firefox-mariadb10.2-php7.1 -- webUIFfSmoke-3-2-firefox-mariadb10.2-php7.1 -- webUIFfSmoke-3-3-firefox-mariadb10.2-php7.1 -- webUIProxySmoke-3-1-chrome-mariadb10.2-php7.1 -- webUIProxySmoke-3-2-chrome-mariadb10.2-php7.1 -- webUIProxySmoke-3-3-chrome-mariadb10.2-php7.1 -- apiProxySmoke-3-1-mariadb10.2-php7.1 -- apiProxySmoke-3-2-mariadb10.2-php7.1 -- apiProxySmoke-3-3-mariadb10.2-php7.1 +- phpunit-php7.2-sqlite-samba +- phpunit-php7.2-sqlite-windows +- phpunit-php7.2-sqlite-webdav +- phpunit-php7.2-sqlite-sftp +- phpunit-php7.2-sqlite-scality +- apiAuth-mariadb10.2-php7.2 +- apiAuthOcs-mariadb10.2-php7.2 +- apiCapabilities-mariadb10.2-php7.2 +- apiComments-mariadb10.2-php7.2 +- apiFavorites-mariadb10.2-php7.2 +- apiMain-mariadb10.2-php7.2 +- apiProvisioning-v1-mariadb10.2-php7.2 +- apiProvisioning-v2-mariadb10.2-php7.2 +- apiProvisioningGroups-v1-mariadb10.2-php7.2 +- apiProvisioningGroups-v2-mariadb10.2-php7.2 +- apiSharees-mariadb10.2-php7.2 +- apiShareManagement-mariadb10.2-php7.2 +- apiShareManagementBasic-mariadb10.2-php7.2 +- apiShareOperations-mariadb10.2-php7.2 +- apiShareReshare-mariadb10.2-php7.2 +- apiShareUpdate-mariadb10.2-php7.2 +- apiTags-mariadb10.2-php7.2 +- apiTrashbin-mariadb10.2-php7.2 +- apiVersions-mariadb10.2-php7.2 +- apiWebdavLocks-mariadb10.2-php7.2 +- apiWebdavLocks2-mariadb10.2-php7.2 +- apiWebdavMove-mariadb10.2-php7.2 +- apiWebdavOperations-mariadb10.2-php7.2 +- apiWebdavProperties-mariadb10.2-php7.2 +- apiWebdavUpload-mariadb10.2-php7.2 +- apiSharingNotifications-mariadb10.2-php7.2 +- apiFederation-master-mariadb10.2-php7.2 +- apiFederation-10.2.1-mariadb10.2-php7.2 +- cliBackground-mariadb10.2-php7.2 +- cliMain-mariadb10.2-php7.2 +- cliProvisioning-mariadb10.2-php7.2 +- cliTrashbin-mariadb10.2-php7.2 +- cliAppManagement-mariadb10.2-php7.2 +- webUIAddUsers-chrome-mariadb10.2-php7.2 +- webUIAdminSettings-chrome-mariadb10.2-php7.2 +- webUIComments-chrome-mariadb10.2-php7.2 +- webUICreateDelete-chrome-mariadb10.2-php7.2 +- webUIFavorites-chrome-mariadb10.2-php7.2 +- webUIFiles-chrome-mariadb10.2-php7.2 +- webUILogin-chrome-mariadb10.2-php7.2 +- webUIManageQuota-chrome-mariadb10.2-php7.2 +- webUIManageUsersGrps-chrome-mariadb10.2-php7.2 +- webUIMoveFilesFolder-chrome-mariadb10.2-php7.2 +- webUIPersonalSetting-chrome-mariadb10.2-php7.2 +- webUIRenameFiles-chrome-mariadb10.2-php7.2 +- webUIRenameFolders-chrome-mariadb10.2-php7.2 +- webUIRestrictSharing-chrome-mariadb10.2-php7.2 +- webUISettingsMenu-chrome-mariadb10.2-php7.2 +- webUISharingAcceptSh-chrome-mariadb10.2-php7.2 +- webUISharingAutocomp-chrome-mariadb10.2-php7.2 +- webUISharingIntGroup-chrome-mariadb10.2-php7.2 +- webUISharingIntUsers-chrome-mariadb10.2-php7.2 +- webUISharingPublic-chrome-mariadb10.2-php7.2 +- webUITags-chrome-mariadb10.2-php7.2 +- webUITrashbin-chrome-mariadb10.2-php7.2 +- webUIUpload-chrome-mariadb10.2-php7.2 +- webUIWebdavLockProt-chrome-mariadb10.2-php7.2 +- webUIWebdavLocks-chrome-mariadb10.2-php7.2 +- webUISharingNotify-chrome-mariadb10.2-php7.2 +- webUISharingExt-master-chrome-mariadb10.2-php7.2 +- webUISharingExt-10.2.1-chrome-mariadb10.2-php7.2 +- webUIFfSmoke-3-1-firefox-mariadb10.2-php7.2 +- webUIFfSmoke-3-2-firefox-mariadb10.2-php7.2 +- webUIFfSmoke-3-3-firefox-mariadb10.2-php7.2 +- webUIProxySmoke-3-1-chrome-mariadb10.2-php7.2 +- webUIProxySmoke-3-2-chrome-mariadb10.2-php7.2 +- webUIProxySmoke-3-3-chrome-mariadb10.2-php7.2 +- apiProxySmoke-3-1-mariadb10.2-php7.2 +- apiProxySmoke-3-2-mariadb10.2-php7.2 +- apiProxySmoke-3-3-mariadb10.2-php7.2 ... From 3ac5392d972e202fba51a935035be16376b946ea Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Thu, 14 Feb 2019 14:33:04 +0545 Subject: [PATCH 04/15] Declare testCase methods void to match modern phpunit declaration --- apps/comments/tests/unit/ActivityListenerTest.php | 2 +- apps/comments/tests/unit/Dav/CommentsNodeTest.php | 2 +- apps/comments/tests/unit/Dav/CommentsPluginTest.php | 2 +- apps/comments/tests/unit/Dav/EntityCollectionTest.php | 2 +- apps/comments/tests/unit/Dav/EntityTypeCollectionTest.php | 2 +- apps/comments/tests/unit/Dav/RootCollectionTest.php | 2 +- apps/dav/tests/unit/Avatars/AvatarHomeTest.php | 2 +- apps/dav/tests/unit/BackgroundJob/CleanPropertiesTest.php | 2 +- apps/dav/tests/unit/CalDAV/AbstractCalDavBackendTest.php | 4 ++-- apps/dav/tests/unit/CalDAV/CalendarTest.php | 2 +- apps/dav/tests/unit/CalDAV/PluginTest.php | 2 +- apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php | 4 ++-- apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php | 2 +- apps/dav/tests/unit/CardDAV/AddressBookImplTest.php | 2 +- apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php | 2 +- apps/dav/tests/unit/CardDAV/CardDavBackendTest.php | 4 ++-- apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php | 2 +- apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php | 2 +- apps/dav/tests/unit/Command/CleanupChunksTest.php | 2 +- apps/dav/tests/unit/Connector/PublicAuthTest.php | 4 ++-- apps/dav/tests/unit/Connector/Sabre/AuthTest.php | 2 +- .../unit/Connector/Sabre/BlockLegacyClientPluginTest.php | 2 +- .../unit/Connector/Sabre/CommentsPropertiesPluginTest.php | 2 +- .../tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php | 2 +- apps/dav/tests/unit/Connector/Sabre/CorsPluginTest.php | 4 ++-- apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php | 2 +- .../unit/Connector/Sabre/DummyGetResponsePluginTest.php | 2 +- apps/dav/tests/unit/Connector/Sabre/FileTest.php | 4 ++-- apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php | 2 +- .../tests/unit/Connector/Sabre/FilesReportPluginTest.php | 2 +- .../unit/Connector/Sabre/FilesSearchReportPluginTest.php | 2 +- .../tests/unit/Connector/Sabre/MaintenancePluginTest.php | 2 +- apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php | 2 +- .../Sabre/RequestTest/PartFileInRootUploadTest.php | 6 +++--- .../tests/unit/Connector/Sabre/RequestTest/RequestTest.php | 2 +- apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php | 2 +- apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php | 2 +- .../unit/Connector/Sabre/ValidateRequestPluginTest.php | 2 +- apps/dav/tests/unit/DAV/CopyPluginTest.php | 2 +- apps/dav/tests/unit/DAV/FileCustomPropertiesBackendTest.php | 4 ++-- apps/dav/tests/unit/DAV/GroupPrincipalTest.php | 2 +- apps/dav/tests/unit/DAV/HookManagerTest.php | 2 +- apps/dav/tests/unit/DAV/LazyOpsPluginTest.php | 2 +- apps/dav/tests/unit/DAV/LockPluginTest.php | 4 ++-- apps/dav/tests/unit/DAV/MiscCustomPropertiesBackendTest.php | 4 ++-- apps/dav/tests/unit/DAV/Sharing/PluginTest.php | 2 +- apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php | 2 +- apps/dav/tests/unit/Files/FileLocksBackendTest.php | 2 +- apps/dav/tests/unit/Files/FilesHomeTest.php | 2 +- apps/dav/tests/unit/Files/PreviewPluginTest.php | 2 +- .../tests/unit/Files/Sharing/PublicLinkEventsPluginTest.php | 2 +- .../dav/tests/unit/JobStatus/Entity/JobStatusMapperTest.php | 4 ++-- apps/dav/tests/unit/JobStatus/JobStatusTest.php | 2 +- apps/dav/tests/unit/Meta/MetaPluginTest.php | 2 +- apps/dav/tests/unit/Repair/RemoveInvalidSharesTest.php | 2 +- apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php | 2 +- apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php | 2 +- apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php | 2 +- .../tests/unit/SystemTag/SystemTagsByIdCollectionTest.php | 2 +- .../SystemTag/SystemTagsObjectMappingCollectionTest.php | 2 +- .../unit/SystemTag/SystemTagsObjectTypeCollectionTest.php | 2 +- apps/dav/tests/unit/TrashBin/TrashBinFileTest.php | 2 +- apps/dav/tests/unit/TrashBin/TrashBinFolderTest.php | 2 +- apps/dav/tests/unit/TrashBin/TrashBinHomeTest.php | 2 +- apps/dav/tests/unit/TreeTest.php | 2 +- apps/dav/tests/unit/Upload/ChunkLocationProviderTest.php | 2 +- apps/dav/tests/unit/Upload/ChunkingPluginTest.php | 2 +- apps/federatedfilesharing/tests/AddressHandlerTest.php | 2 +- .../tests/Command/PollIncomingSharesTest.php | 2 +- .../tests/Controller/OcmControllerTest.php | 2 +- .../tests/Controller/RequestHandlerTest.php | 2 +- .../Controller/SharingPersonalSettingsControllerTest.php | 2 +- apps/federatedfilesharing/tests/DiscoveryManagerTest.php | 2 +- apps/federatedfilesharing/tests/FedShareManagerTest.php | 2 +- .../tests/FederatedShareProviderTest.php | 6 +++--- .../tests/Middleware/OcmMiddlewareTest.php | 2 +- apps/federatedfilesharing/tests/NotificationsTest.php | 2 +- apps/federatedfilesharing/tests/Ocm/PermissionsTest.php | 2 +- apps/federatedfilesharing/tests/Panels/AdminPanelTest.php | 2 +- .../tests/Panels/GeneralPersonalPanelTest.php | 2 +- .../tests/Panels/SharingPersonalPanelTest.php | 2 +- apps/federatedfilesharing/tests/TestCase.php | 4 ++-- apps/federatedfilesharing/tests/TokenHandlerTest.php | 2 +- apps/federation/tests/API/OCSAuthAPITest.php | 2 +- apps/federation/tests/BackgroundJob/GetSharedSecretTest.php | 2 +- .../tests/BackgroundJob/RequestSharedSecretTest.php | 2 +- apps/federation/tests/Controller/SettingsControllerTest.php | 2 +- apps/federation/tests/DbHandlerTest.php | 4 ++-- apps/federation/tests/HooksTest.php | 2 +- .../federation/tests/Middleware/AddServerMiddlewareTest.php | 2 +- apps/federation/tests/PanelTest.php | 2 +- apps/federation/tests/TrustedServersTest.php | 2 +- apps/files/tests/ActivityHelperTest.php | 2 +- apps/files/tests/ActivityTest.php | 2 +- .../tests/BackgroundJob/DeleteOrphanedItemsJobTest.php | 2 +- apps/files/tests/BackgroundJob/ScanFilesTest.php | 2 +- apps/files/tests/CapabilitiesTest.php | 2 +- apps/files/tests/Command/DeleteOrphanedFilesTest.php | 4 ++-- apps/files/tests/Command/ScanTest.php | 4 ++-- apps/files/tests/Command/TransferOwnershipTest.php | 4 ++-- apps/files/tests/Command/VerifyChecksumsTest.php | 2 +- apps/files/tests/Controller/ApiControllerTest.php | 2 +- apps/files/tests/Controller/ViewControllerTest.php | 2 +- apps/files/tests/Service/TagServiceTest.php | 4 ++-- .../tests/Controller/GlobalStoragesControllerTest.php | 2 +- .../tests/Controller/StoragesControllerTest.php | 4 ++-- .../tests/Controller/UserStoragesControllerTest.php | 2 +- apps/files_external/tests/Panels/AdminTest.php | 2 +- apps/files_external/tests/Panels/PersonalTest.php | 2 +- apps/files_external/tests/Storage/GoogleTest.php | 4 ++-- apps/files_external/tests/Storage/OwncloudTest.php | 4 ++-- apps/files_external/tests/Storage/SFTP_KeyTest.php | 4 ++-- apps/files_external/tests/Storage/SftpTest.php | 4 ++-- apps/files_external/tests/Storage/SmbTest.php | 4 ++-- apps/files_external/tests/Storage/WebdavTest.php | 4 ++-- apps/files_sharing/tests/API/ShareesTest.php | 2 +- apps/files_sharing/tests/ActivityTest.php | 2 +- apps/files_sharing/tests/ApiTest.php | 4 ++-- apps/files_sharing/tests/BackendTest.php | 4 ++-- apps/files_sharing/tests/CacheTest.php | 4 ++-- apps/files_sharing/tests/CapabilitiesTest.php | 2 +- .../tests/Command/CleanupRemoteStoragesTest.php | 6 +++--- .../tests/Controller/NotificationControllerTest.php | 2 +- .../tests/Controller/PersonalSettingsControllerTest.php | 2 +- .../tests/Controller/Share20OcsControllerTest.php | 4 ++-- .../tests/Controllers/ExternalShareControllerTest.php | 2 +- .../files_sharing/tests/Controllers/ShareControllerTest.php | 4 ++-- apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php | 6 +++--- apps/files_sharing/tests/ExpireSharesJobTest.php | 4 ++-- apps/files_sharing/tests/External/CacheTest.php | 4 ++-- apps/files_sharing/tests/External/ManagerTest.php | 2 +- apps/files_sharing/tests/External/MountProviderTest.php | 2 +- apps/files_sharing/tests/HooksTest.php | 2 +- apps/files_sharing/tests/LockingTest.php | 2 +- .../tests/Middleware/SharingCheckMiddlewareTest.php | 2 +- apps/files_sharing/tests/MigrationTest.php | 4 ++-- apps/files_sharing/tests/MountProviderTest.php | 2 +- apps/files_sharing/tests/NotifierTest.php | 2 +- apps/files_sharing/tests/Panels/Admin/SettingsPanelTest.php | 2 +- .../tests/Panels/Personal/PersonalPanelTest.php | 2 +- apps/files_sharing/tests/Panels/Personal/SectionTest.php | 2 +- apps/files_sharing/tests/PermissionsTest.php | 4 ++-- apps/files_sharing/tests/PropagationTestCase.php | 4 ++-- .../tests/Service/NotificationPublisherTest.php | 4 ++-- apps/files_sharing/tests/ShareTest.php | 4 ++-- apps/files_sharing/tests/SharedMountTest.php | 4 ++-- apps/files_sharing/tests/SharedStorageTest.php | 4 ++-- apps/files_sharing/tests/SharingBlacklistTest.php | 2 +- apps/files_sharing/tests/TestCase.php | 6 +++--- apps/files_sharing/tests/UnshareChildrenTest.php | 4 ++-- apps/files_sharing/tests/UpdaterTest.php | 4 ++-- apps/files_sharing/tests/WatcherTest.php | 4 ++-- apps/files_trashbin/tests/Command/CleanUpTest.php | 2 +- apps/files_trashbin/tests/Command/ExpireTrashTest.php | 2 +- apps/files_trashbin/tests/QuotaTest.php | 2 +- apps/files_trashbin/tests/StorageTest.php | 4 ++-- apps/files_trashbin/tests/TrashbinTest.php | 6 +++--- apps/files_versions/tests/Command/CleanupTest.php | 2 +- apps/files_versions/tests/Command/ExpireVersionsTest.php | 2 +- apps/files_versions/tests/VersioningTest.php | 4 ++-- apps/provisioning_api/tests/AppsTest.php | 2 +- apps/provisioning_api/tests/GroupsTest.php | 2 +- apps/provisioning_api/tests/TestCase.php | 4 ++-- apps/provisioning_api/tests/UsersTest.php | 4 ++-- apps/systemtags/tests/unit/activity/ExtensionTest.php | 2 +- apps/systemtags/tests/unit/activity/ListenerTest.php | 2 +- .../tests/Controller/AdminControllerTest.php | 2 +- .../tests/Notification/BackgroundJobTest.php | 2 +- apps/updatenotification/tests/Notification/NotifierTest.php | 2 +- .../tests/ResetTokenBackgroundJobTest.php | 2 +- apps/updatenotification/tests/UpdateCheckerTest.php | 2 +- tests/Core/Command/Apps/AppsDisableTest.php | 2 +- tests/Core/Command/Apps/AppsEnableTest.php | 2 +- tests/Core/Command/Apps/AppsGetPathTest.php | 2 +- tests/Core/Command/Apps/AppsListTest.php | 2 +- tests/Core/Command/Background/Queue/DeleteTest.php | 2 +- tests/Core/Command/Background/Queue/ExecuteTest.php | 2 +- tests/Core/Command/Background/Queue/StatusTest.php | 2 +- tests/Core/Command/Config/App/DeleteConfigTest.php | 2 +- tests/Core/Command/Config/App/GetConfigTest.php | 2 +- tests/Core/Command/Config/App/SetConfigTest.php | 2 +- tests/Core/Command/Config/ImportTest.php | 2 +- tests/Core/Command/Config/ListConfigsTest.php | 2 +- tests/Core/Command/Config/System/DeleteConfigTest.php | 2 +- tests/Core/Command/Config/System/GetConfigTest.php | 2 +- tests/Core/Command/Config/System/SetConfigTest.php | 2 +- tests/Core/Command/Db/ConvertTypeTest.php | 2 +- tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php | 2 +- tests/Core/Command/Encryption/DecryptAllTest.php | 2 +- tests/Core/Command/Encryption/DisableTest.php | 2 +- tests/Core/Command/Encryption/EnableTest.php | 2 +- tests/Core/Command/Encryption/EncryptAllTest.php | 2 +- tests/Core/Command/Encryption/SetDefaultModuleTest.php | 2 +- tests/Core/Command/Group/AddMemberTest.php | 2 +- tests/Core/Command/Group/AddTest.php | 2 +- tests/Core/Command/Group/DeleteTest.php | 2 +- tests/Core/Command/Group/ListGroupMembersTest.php | 2 +- tests/Core/Command/Group/ListGroupsTest.php | 2 +- tests/Core/Command/Group/RemoveMemberTest.php | 2 +- tests/Core/Command/Log/ManageTest.php | 2 +- tests/Core/Command/Log/OwnCloudTest.php | 2 +- tests/Core/Command/Maintenance/DataFingerprintTest.php | 2 +- tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php | 2 +- tests/Core/Command/Maintenance/RepairTest.php | 4 ++-- tests/Core/Command/Maintenance/SingleUserTest.php | 2 +- tests/Core/Command/System/CronTest.php | 2 +- tests/Core/Command/TwoFactorAuth/DisableTest.php | 2 +- tests/Core/Command/TwoFactorAuth/EnableTest.php | 2 +- tests/Core/Command/User/AddTest.php | 4 ++-- tests/Core/Command/User/DeleteTest.php | 2 +- tests/Core/Command/User/DisableTest.php | 2 +- tests/Core/Command/User/EnableTest.php | 2 +- tests/Core/Command/User/InactiveTest.php | 2 +- tests/Core/Command/User/LastSeenTest.php | 2 +- tests/Core/Command/User/ListUserGroupsTest.php | 2 +- tests/Core/Command/User/ListUsersTest.php | 4 ++-- tests/Core/Command/User/ModifyTest.php | 2 +- tests/Core/Command/User/ResetPasswordTest.php | 2 +- tests/Core/Command/User/SettingTest.php | 2 +- tests/Core/Controller/AvatarControllerTest.php | 4 ++-- tests/Core/Controller/CronControllerTest.php | 2 +- tests/Core/Controller/LoginControllerTest.php | 2 +- tests/Core/Controller/LostControllerTest.php | 2 +- tests/Core/Controller/TokenControllerTest.php | 2 +- tests/Core/Controller/TwoFactorChallengeControllerTest.php | 2 +- tests/Core/Middleware/AccountModuleMiddlewareTest.php | 2 +- tests/Core/Middleware/TwoFactorMiddlewareTest.php | 2 +- tests/Settings/Controller/AppSettingsControllerTest.php | 2 +- tests/Settings/Controller/AuthSettingsControllerTest.php | 2 +- tests/Settings/Controller/CertificateControllerTest.php | 2 +- tests/Settings/Controller/CheckSetupControllerTest.php | 2 +- tests/Settings/Controller/CorsControllerTest.php | 2 +- tests/Settings/Controller/GroupsControllerTest.php | 2 +- tests/Settings/Controller/LegalControllerTest.php | 2 +- tests/Settings/Controller/LogSettingsControllerTest.php | 2 +- tests/Settings/Controller/MailSettingsControllerTest.php | 2 +- tests/Settings/Controller/SettingsPageControllerTest.php | 2 +- tests/Settings/Controller/UsersControllerTest.php | 2 +- tests/Settings/Middleware/SubadminMiddlewareTest.php | 2 +- tests/Settings/Panels/Admin/AppsTest.php | 2 +- tests/Settings/Panels/Admin/BackgroundJobsTest.php | 2 +- tests/Settings/Panels/Admin/CertificatesTest.php | 2 +- tests/Settings/Panels/Admin/EncryptionTest.php | 2 +- tests/Settings/Panels/Admin/FileSharingTest.php | 2 +- tests/Settings/Panels/Admin/LegacyTest.php | 2 +- tests/Settings/Panels/Admin/LegalTest.php | 2 +- tests/Settings/Panels/Admin/LoggingTest.php | 2 +- tests/Settings/Panels/Admin/MailTest.php | 2 +- tests/Settings/Panels/Admin/SecurityWarningTest.php | 2 +- tests/Settings/Panels/Admin/TipsTest.php | 2 +- tests/Settings/Panels/Personal/ClientsTest.php | 2 +- tests/Settings/Panels/Personal/LegacyTest.php | 2 +- tests/Settings/Panels/Personal/ProfileTest.php | 2 +- tests/Settings/Panels/Personal/QuotaTest.php | 2 +- tests/Settings/Panels/Personal/TokensTest.php | 2 +- tests/Settings/Panels/Personal/VersionTest.php | 2 +- tests/TestHelpers/Unit/DeleteHelperTest.php | 2 +- tests/TestHelpers/Unit/WebDavHelperTest.php | 2 +- tests/lib/Activity/ManagerTest.php | 2 +- tests/lib/Activity/NullSession/ManagerTest.php | 2 +- tests/lib/App/CodeChecker/InfoCheckerTest.php | 2 +- tests/lib/App/DependencyAnalyzerTest.php | 2 +- tests/lib/App/InfoParserTest.php | 2 +- tests/lib/App/ManagerTest.php | 2 +- tests/lib/AppConfigTest.php | 4 ++-- tests/lib/AppFramework/AppTest.php | 4 ++-- tests/lib/AppFramework/Controller/ControllerTest.php | 2 +- tests/lib/AppFramework/Db/EntityTest.php | 2 +- tests/lib/AppFramework/Db/MapperTest.php | 2 +- tests/lib/AppFramework/Db/MapperTestUtility.php | 2 +- .../AppFramework/DependencyInjection/DIContainerTest.php | 2 +- tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php | 2 +- tests/lib/AppFramework/Http/DataResponseTest.php | 2 +- tests/lib/AppFramework/Http/DispatcherTest.php | 2 +- tests/lib/AppFramework/Http/DownloadResponseTest.php | 2 +- .../AppFramework/Http/EmptyContentSecurityPolicyTest.php | 2 +- tests/lib/AppFramework/Http/HttpTest.php | 2 +- tests/lib/AppFramework/Http/JSONResponseTest.php | 2 +- tests/lib/AppFramework/Http/RedirectResponseTest.php | 2 +- tests/lib/AppFramework/Http/RequestTest.php | 4 ++-- tests/lib/AppFramework/Http/ResponseTest.php | 2 +- tests/lib/AppFramework/Http/StreamResponseTest.php | 2 +- tests/lib/AppFramework/Http/TemplateResponseTest.php | 2 +- .../AppFramework/Middleware/MiddlewareDispatcherTest.php | 2 +- tests/lib/AppFramework/Middleware/MiddlewareTest.php | 2 +- .../AppFramework/Middleware/Security/CORSMiddlewareTest.php | 2 +- .../Middleware/Security/SecurityMiddlewareTest.php | 2 +- tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php | 2 +- tests/lib/AppFramework/Utility/SimpleContainerTest.php | 2 +- tests/lib/Archive/TARTest.php | 2 +- tests/lib/Archive/ZIPTest.php | 2 +- tests/lib/Authentication/AccountModule/ManagerTest.php | 2 +- .../lib/Authentication/Token/DefaultTokenCleanupJobTest.php | 4 ++-- tests/lib/Authentication/Token/DefaultTokenMapperTest.php | 2 +- tests/lib/Authentication/Token/DefaultTokenProviderTest.php | 2 +- tests/lib/Authentication/TwoFactorAuth/ManagerTest.php | 2 +- tests/lib/AutoLoaderTest.php | 2 +- tests/lib/AvatarManagerTest.php | 2 +- tests/lib/AvatarTest.php | 2 +- tests/lib/BackgroundJob/JobListTest.php | 2 +- tests/lib/BackgroundJob/JobTest.php | 2 +- tests/lib/BackgroundJob/QueuedJobTest.php | 2 +- tests/lib/BackgroundJob/TimedJobTest.php | 2 +- tests/lib/Cache/CappedMemoryCacheTest.php | 2 +- tests/lib/Cache/FileCacheTest.php | 4 ++-- tests/lib/Cache/TestCache.php | 2 +- tests/lib/Command/AsyncBusTest.php | 2 +- tests/lib/Command/Integrity/SignAppTest.php | 2 +- tests/lib/Command/Integrity/SignCoreTest.php | 2 +- tests/lib/Command/User/SyncBackendTest.php | 2 +- tests/lib/Comments/ManagerTest.php | 4 ++-- tests/lib/ConfigTest.php | 4 ++-- tests/lib/ContactsManagerTest.php | 2 +- tests/lib/DB/AdapterTest.php | 2 +- tests/lib/DB/ConnectionTest.php | 6 +++--- tests/lib/DB/DBSchemaTest.php | 4 ++-- tests/lib/DB/LegacyDBTest.php | 4 ++-- tests/lib/DB/MDB2SchemaManagerTest.php | 2 +- tests/lib/DB/MigrationsTest.php | 2 +- tests/lib/DB/MigratorTest.php | 4 ++-- tests/lib/DB/MySqlMigrationTest.php | 4 ++-- tests/lib/DB/MySqlToolsTest.php | 2 +- tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php | 2 +- tests/lib/DB/QueryBuilder/QueryBuilderTest.php | 2 +- tests/lib/DB/QueryBuilder/QuoteHelperTest.php | 2 +- tests/lib/DB/SchemaDiffTest.php | 4 ++-- tests/lib/DB/SqliteMigrationTest.php | 4 ++-- tests/lib/DateTimeFormatterTest.php | 4 ++-- tests/lib/Diagnostics/EventLoggerTest.php | 2 +- tests/lib/Diagnostics/QueryLoggerTest.php | 2 +- tests/lib/Encryption/DecryptAllTest.php | 2 +- tests/lib/Encryption/EncryptionWrapperTest.php | 2 +- tests/lib/Encryption/Keys/StorageTest.php | 4 ++-- tests/lib/Encryption/ManagerTest.php | 2 +- tests/lib/Encryption/UpdateTest.php | 2 +- tests/lib/Encryption/UtilTest.php | 2 +- tests/lib/Events/EventEmitterTraitTest.php | 4 ++-- tests/lib/Files/Cache/CacheTest.php | 4 ++-- tests/lib/Files/Cache/HomeCacheTest.php | 2 +- tests/lib/Files/Cache/MoveFromCacheTraitTest.php | 2 +- tests/lib/Files/Cache/PropagatorTest.php | 2 +- tests/lib/Files/Cache/ScannerTest.php | 4 ++-- tests/lib/Files/Cache/UpdaterLegacyTest.php | 4 ++-- tests/lib/Files/Cache/UpdaterTest.php | 4 ++-- tests/lib/Files/Cache/WatcherTest.php | 4 ++-- tests/lib/Files/Cache/Wrapper/CacheJailTest.php | 2 +- tests/lib/Files/Cache/Wrapper/CachePermissionsMaskTest.php | 2 +- tests/lib/Files/Config/UserMountCacheTest.php | 4 ++-- tests/lib/Files/EtagTest.php | 4 ++-- .../Files/External/Auth/Password/SessionCredentialsTest.php | 4 ++-- tests/lib/Files/External/ConfigAdapterTest.php | 2 +- tests/lib/Files/External/Service/DBConfigServiceTest.php | 4 ++-- .../Service/GlobalStoragesServiceDeleteUserTest.php | 4 ++-- .../Files/External/Service/GlobalStoragesServiceTest.php | 4 ++-- tests/lib/Files/External/Service/StoragesServiceTest.php | 4 ++-- .../External/Service/UserGlobalStoragesServiceTest.php | 2 +- .../lib/Files/External/Service/UserStoragesServiceTest.php | 2 +- tests/lib/Files/External/StoragesBackendServiceTest.php | 2 +- tests/lib/Files/FilesystemTest.php | 4 ++-- tests/lib/Files/MetaFilesTest.php | 4 ++-- tests/lib/Files/MetaVersionCollectionTest.php | 4 ++-- tests/lib/Files/Mount/CacheMountProviderTest.php | 2 +- tests/lib/Files/Mount/ManagerTest.php | 2 +- tests/lib/Files/Mount/ObjectHomeMountProviderTest.php | 2 +- tests/lib/Files/Mount/PreviewsMountProviderTest.php | 2 +- tests/lib/Files/Node/HookConnectorTest.php | 4 ++-- tests/lib/Files/Node/IntegrationTest.php | 4 ++-- tests/lib/Files/Node/NodeTest.php | 2 +- tests/lib/Files/Node/RootTest.php | 2 +- tests/lib/Files/ObjectStore/NoopScannerTest.php | 2 +- tests/lib/Files/ObjectStore/ObjectStoreTest.php | 2 +- tests/lib/Files/PathVerificationTest.php | 2 +- tests/lib/Files/Storage/CommonTest.php | 4 ++-- tests/lib/Files/Storage/CopyDirectoryTest.php | 2 +- tests/lib/Files/Storage/DavTest.php | 4 ++-- tests/lib/Files/Storage/HomeTest.php | 4 ++-- tests/lib/Files/Storage/LocalTest.php | 4 ++-- tests/lib/Files/Storage/LockingTests.php | 4 ++-- tests/lib/Files/Storage/NodeTest.php | 2 +- tests/lib/Files/Storage/Wrapper/ChecksumTest.php | 2 +- tests/lib/Files/Storage/Wrapper/DirMaskTest.php | 2 +- tests/lib/Files/Storage/Wrapper/EncodingTest.php | 4 ++-- tests/lib/Files/Storage/Wrapper/EncryptionTest.php | 2 +- tests/lib/Files/Storage/Wrapper/JailTest.php | 4 ++-- tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php | 4 ++-- tests/lib/Files/Storage/Wrapper/QuotaTest.php | 4 ++-- tests/lib/Files/Storage/Wrapper/ReadOnlyJailTest.php | 2 +- tests/lib/Files/Storage/Wrapper/WrapperTest.php | 4 ++-- tests/lib/Files/Stream/QuotaTest.php | 2 +- tests/lib/Files/Stream/StaticStreamTest.php | 4 ++-- tests/lib/Files/Type/DetectionTest.php | 2 +- tests/lib/Files/Type/LoaderTest.php | 4 ++-- tests/lib/Files/Utils/ScannerTest.php | 4 ++-- tests/lib/Files/ViewTest.php | 4 ++-- tests/lib/Group/DatabaseTest.php | 4 ++-- tests/lib/Group/Dummy.php | 2 +- tests/lib/Group/ManagerTest.php | 2 +- tests/lib/Group/MetaDataTest.php | 2 +- tests/lib/HTTPHelperTest.php | 2 +- tests/lib/Helper/EnvironmentHelperTest.php | 2 +- tests/lib/Helper/LocaleHelperTest.php | 2 +- tests/lib/Helper/UserTypeHelperTest.php | 2 +- tests/lib/HelperStorageTest.php | 4 ++-- tests/lib/Hooks/BasicEmitterTest.php | 2 +- tests/lib/Hooks/LegacyEmitterTest.php | 2 +- tests/lib/Http/Client/ClientTest.php | 2 +- tests/lib/Http/Client/ResponseTest.php | 2 +- tests/lib/Http/Client/WebDavClientServiceTest.php | 4 ++-- tests/lib/ImageTest.php | 2 +- tests/lib/InstallerTest.php | 4 ++-- tests/lib/IntegrityCheck/CheckerTest.php | 2 +- tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php | 2 +- tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php | 4 ++-- tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php | 2 +- .../Iterator/ExcludeFileByNameFilterIteratorTest.php | 2 +- tests/lib/L10N/FactoryTest.php | 2 +- tests/lib/LargeFileHelperGetFileSizeTest.php | 2 +- tests/lib/LargeFileHelperTest.php | 2 +- tests/lib/Lock/DBLockingProviderTest.php | 4 ++-- tests/lib/Lock/LockingProvider.php | 2 +- tests/lib/Lock/MemcacheLockingProviderTest.php | 2 +- tests/lib/Lock/Persistent/LockManagerTest.php | 2 +- tests/lib/Lock/Persistent/LockMapperTest.php | 4 ++-- tests/lib/Log/OwncloudTest.php | 4 ++-- tests/lib/LoggerTest.php | 2 +- tests/lib/Mail/MailerTest.php | 2 +- tests/lib/Mail/MessageTest.php | 2 +- tests/lib/Memcache/APCuTest.php | 2 +- tests/lib/Memcache/ArrayCacheTest.php | 2 +- tests/lib/Memcache/Cache.php | 2 +- tests/lib/Memcache/MemcachedTest.php | 2 +- tests/lib/Memcache/RedisTest.php | 2 +- tests/lib/Migration/BackgroundRepairTest.php | 2 +- tests/lib/NavigationManagerTest.php | 2 +- tests/lib/Notification/ActionTest.php | 2 +- tests/lib/Notification/ManagerTest.php | 2 +- tests/lib/Notification/NotificationTest.php | 2 +- tests/lib/OCS/PrivatedataTest.php | 2 +- tests/lib/OCS/ProviderTest.php | 2 +- tests/lib/Preview/BitmapTest.php | 2 +- tests/lib/Preview/ImageTest.php | 2 +- tests/lib/Preview/MP3Test.php | 2 +- tests/lib/Preview/MovieTest.php | 2 +- tests/lib/Preview/OfficeTest.php | 2 +- tests/lib/Preview/Provider.php | 4 ++-- tests/lib/Preview/SVGTest.php | 2 +- tests/lib/Preview/TXTTest.php | 2 +- tests/lib/PreviewManagerTest.php | 2 +- tests/lib/PreviewTest.php | 4 ++-- tests/lib/PublicNamespace/ContactsTest.php | 2 +- tests/lib/PublicNamespace/UtilTest.php | 2 +- tests/lib/Repair/AppsTest.php | 2 +- tests/lib/Repair/CleanTagsTest.php | 4 ++-- tests/lib/Repair/DisableExtraThemesTest.php | 2 +- tests/lib/Repair/DropOldJobsTest.php | 2 +- tests/lib/Repair/DropOldTablesTest.php | 2 +- tests/lib/Repair/OldGroupMembershipSharesTest.php | 4 ++-- tests/lib/Repair/RemoveGetETagEntriesTest.php | 2 +- tests/lib/Repair/RemoveRootSharesTest.php | 6 +++--- tests/lib/Repair/RepairCollationTest.php | 4 ++-- tests/lib/Repair/RepairInnoDBTest.php | 4 ++-- tests/lib/Repair/RepairInvalidSharesTest.php | 4 ++-- tests/lib/Repair/RepairMimeTypesTest.php | 4 ++-- tests/lib/Repair/RepairMismatchFileCachePathTest.php | 4 ++-- tests/lib/Repair/RepairOrphanedSubshareTest.php | 4 ++-- tests/lib/Repair/RepairSqliteAutoincrementTest.php | 4 ++-- tests/lib/Repair/RepairSubSharesTest.php | 4 ++-- tests/lib/Repair/RepairUnmergedSharesTest.php | 4 ++-- tests/lib/RepairStepTest.php | 2 +- tests/lib/Route/RouterTest.php | 2 +- tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php | 2 +- tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php | 2 +- tests/lib/Security/CSRF/CsrfTokenManagerTest.php | 2 +- tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php | 2 +- tests/lib/Security/CertificateManagerTest.php | 2 +- tests/lib/Security/CertificateTest.php | 2 +- tests/lib/Security/CredentialsManagerTest.php | 2 +- tests/lib/Security/CryptoTest.php | 2 +- tests/lib/Security/HasherTest.php | 2 +- tests/lib/Security/SecureRandomTest.php | 2 +- tests/lib/Security/TrustedDomainHelperTest.php | 2 +- tests/lib/ServerTest.php | 2 +- tests/lib/Session/CryptoSessionDataTest.php | 2 +- tests/lib/Session/CryptoWrappingTest.php | 2 +- tests/lib/Session/MemoryTest.php | 2 +- tests/lib/Session/Session.php | 2 +- tests/lib/Settings/ManagerTest.php | 2 +- tests/lib/SetupTest.php | 2 +- tests/lib/Share/MailNotificationsTest.php | 2 +- tests/lib/Share/ShareTest.php | 4 ++-- tests/lib/Share20/DefaultShareProviderTest.php | 4 ++-- tests/lib/Share20/ManagerTest.php | 4 ++-- tests/lib/Share20/ShareTest.php | 2 +- tests/lib/StreamWrappersTest.php | 2 +- tests/lib/SubAdminTest.php | 4 ++-- tests/lib/SystemConfigTest.php | 4 ++-- tests/lib/SystemTag/SystemTagManagerTest.php | 4 ++-- tests/lib/SystemTag/SystemTagObjectMapperTest.php | 4 ++-- tests/lib/TagsTest.php | 4 ++-- tests/lib/TempManagerTest.php | 4 ++-- tests/lib/Template/BaseTest.php | 2 +- tests/lib/Template/CSSResourceLocatorTest.php | 2 +- tests/lib/Template/JSResourceLocatorTest.php | 2 +- tests/lib/Template/ResourceLocatorTest.php | 2 +- tests/lib/TemplateFunctionsTest.php | 2 +- tests/lib/TestCase.php | 6 +++--- tests/lib/Theme/ThemeServiceTest.php | 2 +- tests/lib/Theme/ThemeTest.php | 2 +- tests/lib/Updater/VersionCheckTest.php | 2 +- tests/lib/UpdaterTest.php | 2 +- tests/lib/UrlGeneratorTest.php | 2 +- tests/lib/User/AccountMapperTest.php | 4 ++-- tests/lib/User/BasicAuthModuleTest.php | 2 +- tests/lib/User/DatabaseTest.php | 4 ++-- tests/lib/User/DummyTestCase.php | 2 +- tests/lib/User/ManagerTest.php | 2 +- tests/lib/User/SessionTest.php | 2 +- tests/lib/User/Sync/AllUsersIteratorTest.php | 2 +- tests/lib/User/Sync/SeenUsersIteratorTest.php | 2 +- tests/lib/User/SyncServiceTest.php | 2 +- tests/lib/User/TokenAuthModuleTest.php | 2 +- tests/lib/User/UserTest.php | 2 +- tests/lib/UtilCheckServerTest.php | 4 ++-- tests/lib/UtilTest.php | 4 ++-- tests/lib/legacy/AppTest.php | 4 ++-- 525 files changed, 673 insertions(+), 673 deletions(-) diff --git a/apps/comments/tests/unit/ActivityListenerTest.php b/apps/comments/tests/unit/ActivityListenerTest.php index 6f81cc1da7d6..f4fd1bffbb09 100644 --- a/apps/comments/tests/unit/ActivityListenerTest.php +++ b/apps/comments/tests/unit/ActivityListenerTest.php @@ -71,7 +71,7 @@ class ActivityListenerTest extends \Test\TestCase { */ private $activityManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->activityManager = $this->createMock(IManager::class); diff --git a/apps/comments/tests/unit/Dav/CommentsNodeTest.php b/apps/comments/tests/unit/Dav/CommentsNodeTest.php index 8f866fe08332..aad4cb2e29b5 100644 --- a/apps/comments/tests/unit/Dav/CommentsNodeTest.php +++ b/apps/comments/tests/unit/Dav/CommentsNodeTest.php @@ -35,7 +35,7 @@ class CommentsNodeTest extends \Test\TestCase { protected $logger; protected $userSession; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->commentsManager = $this->createMock('\OCP\Comments\ICommentsManager'); diff --git a/apps/comments/tests/unit/Dav/CommentsPluginTest.php b/apps/comments/tests/unit/Dav/CommentsPluginTest.php index 16666f01a484..b18bb98ea995 100644 --- a/apps/comments/tests/unit/Dav/CommentsPluginTest.php +++ b/apps/comments/tests/unit/Dav/CommentsPluginTest.php @@ -44,7 +44,7 @@ class CommentsPluginTest extends \Test\TestCase { /** @var CommentsPluginImplementation */ private $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->tree = $this->getMockBuilder('\Sabre\DAV\Tree') ->disableOriginalConstructor() diff --git a/apps/comments/tests/unit/Dav/EntityCollectionTest.php b/apps/comments/tests/unit/Dav/EntityCollectionTest.php index 460283752a47..4eea2e68f24c 100644 --- a/apps/comments/tests/unit/Dav/EntityCollectionTest.php +++ b/apps/comments/tests/unit/Dav/EntityCollectionTest.php @@ -46,7 +46,7 @@ class EntityCollectionTest extends \Test\TestCase { /** @var EventDispatcherInterface | \PHPUnit_Framework_MockObject_MockObject */ private $dispatcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->commentsManager = $this->createMock(ICommentsManager::class); diff --git a/apps/comments/tests/unit/Dav/EntityTypeCollectionTest.php b/apps/comments/tests/unit/Dav/EntityTypeCollectionTest.php index cd8c164ce347..3bd33c150b19 100644 --- a/apps/comments/tests/unit/Dav/EntityTypeCollectionTest.php +++ b/apps/comments/tests/unit/Dav/EntityTypeCollectionTest.php @@ -48,7 +48,7 @@ class EntityTypeCollectionTest extends \Test\TestCase { /** @var EventDispatcherInterface | \PHPUnit_Framework_MockObject_MockObject */ private $dispatcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->commentsManager = $this->createMock(ICommentsManager::class); diff --git a/apps/comments/tests/unit/Dav/RootCollectionTest.php b/apps/comments/tests/unit/Dav/RootCollectionTest.php index 7714a8cbbb40..2c15a8e92ef3 100644 --- a/apps/comments/tests/unit/Dav/RootCollectionTest.php +++ b/apps/comments/tests/unit/Dav/RootCollectionTest.php @@ -45,7 +45,7 @@ class RootCollectionTest extends \Test\TestCase { /** @var \OCP\IUser|\PHPUnit\Framework\MockObject\MockObject */ protected $user; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->user = $this->createMock('\OCP\IUser'); diff --git a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php index 202b7293e713..7a34ebc77ffb 100644 --- a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php +++ b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php @@ -37,7 +37,7 @@ class AvatarHomeTest extends TestCase { /** @var IAvatarManager | \PHPUnit\Framework\MockObject\MockObject */ private $avatarManager; - public function setUp() { + public function setUp(): void { $this->avatarManager = $this->createMock(IAvatarManager::class); $this->home = new AvatarHome(['uri' => 'principals/users/admin'], $this->avatarManager); } diff --git a/apps/dav/tests/unit/BackgroundJob/CleanPropertiesTest.php b/apps/dav/tests/unit/BackgroundJob/CleanPropertiesTest.php index 121e99351437..39533c73f807 100644 --- a/apps/dav/tests/unit/BackgroundJob/CleanPropertiesTest.php +++ b/apps/dav/tests/unit/BackgroundJob/CleanPropertiesTest.php @@ -44,7 +44,7 @@ class CleanPropertiesTest extends TestCase { /** @var string */ private $username; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); diff --git a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackendTest.php b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackendTest.php index 8a1b52a1c620..136d15763da8 100644 --- a/apps/dav/tests/unit/CalDAV/AbstractCalDavBackendTest.php +++ b/apps/dav/tests/unit/CalDAV/AbstractCalDavBackendTest.php @@ -59,7 +59,7 @@ abstract class AbstractCalDavBackendTest extends TestCase { /** @var ISecureRandom */ private $random; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->principal = $this->getMockBuilder(Principal::class) @@ -83,7 +83,7 @@ public function setUp() { $this->tearDown(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); if ($this->backend === null) { diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php index 1806a6525512..b90d1f3537f7 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php @@ -36,7 +36,7 @@ class CalendarTest extends TestCase { /** @var IL10N */ private $l10n; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->l10n = $this->getMockBuilder(IL10N::class) ->disableOriginalConstructor()->getMock(); diff --git a/apps/dav/tests/unit/CalDAV/PluginTest.php b/apps/dav/tests/unit/CalDAV/PluginTest.php index 8e09e34bff28..07f25746c043 100644 --- a/apps/dav/tests/unit/CalDAV/PluginTest.php +++ b/apps/dav/tests/unit/CalDAV/PluginTest.php @@ -14,7 +14,7 @@ class PluginTest extends TestCase { /** @var Plugin */ private $plugin; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->plugin = new Plugin(); diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php index 7df339e9b707..d393dd181887 100644 --- a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php +++ b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php @@ -61,7 +61,7 @@ class PublicCalendarRootTest extends TestCase { /** @var ISecureRandom */ private $random; - public function setUp() { + public function setUp(): void { parent::setUp(); $db = \OC::$server->getDatabaseConnection(); @@ -81,7 +81,7 @@ public function setUp() { ->disableOriginalConstructor()->getMock(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); if ($this->backend === null) { diff --git a/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php b/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php index bfde545f33bc..bedd8e88c377 100644 --- a/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php +++ b/apps/dav/tests/unit/CalDAV/Publishing/PublishingTest.php @@ -44,7 +44,7 @@ class PluginTest extends TestCase { /** @var IURLGenerator | \PHPUnit\Framework\MockObject\MockObject */ private $urlGenerator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder('\OCP\IConfig')-> diff --git a/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php index fa891d1d76b6..0072196dc495 100644 --- a/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php +++ b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php @@ -52,7 +52,7 @@ class AddressBookImplTest extends TestCase { /** @var VCard | \PHPUnit\Framework\MockObject\MockObject */ private $vCard; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->addressBookInfo = [ diff --git a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php index f910de092497..b4690e5c87bc 100644 --- a/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php +++ b/apps/dav/tests/unit/CardDAV/BirthdayServiceTest.php @@ -41,7 +41,7 @@ class BirthdayServiceTest extends TestCase { /** @var GroupPrincipalBackend | \PHPUnit\Framework\MockObject\MockObject */ private $groupPrincipalBackend; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->calDav = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock(); diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php index 9dae23bb041a..db837faa3e9a 100644 --- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php +++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php @@ -68,7 +68,7 @@ class CardDavBackendTest extends TestCase { const UNIT_TEST_USER1 = 'principals/users/carddav-unit-test1'; const UNIT_TEST_GROUP = 'principals/groups/carddav-unit-test-group'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->principal = $this->getMockBuilder(Principal::class) @@ -98,7 +98,7 @@ public function setUp() { $this->tearDown(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); if ($this->backend === null) { diff --git a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php index ebc5f94abb5e..f6e11b92dd81 100644 --- a/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php +++ b/apps/dav/tests/unit/CardDAV/ImageExportPluginTest.php @@ -46,7 +46,7 @@ class ImageExportPluginTest extends TestCase { /** @var ILogger | \PHPUnit\Framework\MockObject\MockObject */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder('Sabre\HTTP\RequestInterface')->getMock(); diff --git a/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php b/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php index 720522952c02..20a11df8ed8e 100644 --- a/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php +++ b/apps/dav/tests/unit/CardDAV/Sharing/PluginTest.php @@ -41,7 +41,7 @@ class PluginTest extends TestCase { /** @var IShareable | \PHPUnit\Framework\MockObject\MockObject */ private $book; - public function setUp() { + public function setUp(): void { parent::setUp(); /** @var Auth | \PHPUnit\Framework\MockObject\MockObject $authBackend */ diff --git a/apps/dav/tests/unit/Command/CleanupChunksTest.php b/apps/dav/tests/unit/Command/CleanupChunksTest.php index 225ebcef82c1..f28d6f6f6c64 100644 --- a/apps/dav/tests/unit/Command/CleanupChunksTest.php +++ b/apps/dav/tests/unit/Command/CleanupChunksTest.php @@ -42,7 +42,7 @@ class CleanupChunksTest extends TestCase { /** @var IUser */ private $user; - public function setUp() { + public function setUp(): void { parent::setUp(); $command = new CleanupChunks(\OC::$server->getUserManager()); diff --git a/apps/dav/tests/unit/Connector/PublicAuthTest.php b/apps/dav/tests/unit/Connector/PublicAuthTest.php index 5040b05f0c66..e26dba5c6509 100644 --- a/apps/dav/tests/unit/Connector/PublicAuthTest.php +++ b/apps/dav/tests/unit/Connector/PublicAuthTest.php @@ -49,7 +49,7 @@ class PublicAuthTest extends \Test\TestCase { /** @var string */ private $oldUser; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->session = $this->createMock('\OCP\ISession'); @@ -66,7 +66,7 @@ protected function setUp() { $this->oldUser = \OC_User::getUser(); } - protected function tearDown() { + protected function tearDown(): void { \OC_User::setIncognitoMode(false); // Set old user diff --git a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php index 0b186f2f0096..8fbf928d8e0a 100644 --- a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php @@ -62,7 +62,7 @@ class AuthTest extends TestCase { /** @var AccountModuleManager | MockObject */ private $accountModuleManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->session = $this->createMock(ISession::class); $this->userSession = $this->createMock(Session::class); diff --git a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php index 1051867640d0..507c330d848b 100644 --- a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php @@ -39,7 +39,7 @@ class BlockLegacyClientPluginTest extends TestCase { /** @var BlockLegacyClientPlugin */ private $blockLegacyClientVersionPlugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock('\OCP\IConfig'); diff --git a/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php index 8e20020030b1..ee8d65b19d49 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CommentsPropertiesPluginTest.php @@ -34,7 +34,7 @@ class CommentsPropertiesPluginTest extends \Test\TestCase { protected $server; protected $userFolder; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->commentsManager = $this->createMock('\OCP\Comments\ICommentsManager'); diff --git a/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php index 6728c802c564..b9bb2f595004 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CopyEtagHeaderPluginTest.php @@ -42,7 +42,7 @@ class CopyEtagHeaderPluginTest extends TestCase { /** @var Server */ private $server; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = new \Sabre\DAV\Server(); $this->plugin = new CopyEtagHeaderPlugin(); diff --git a/apps/dav/tests/unit/Connector/Sabre/CorsPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/CorsPluginTest.php index fd22d7931be6..5af1bb31fb6a 100644 --- a/apps/dav/tests/unit/Connector/Sabre/CorsPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/CorsPluginTest.php @@ -52,7 +52,7 @@ class CorsPluginTest extends TestCase { */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = new Server(); @@ -79,7 +79,7 @@ public function setUp() { $this->server->addPlugin($extraMethodPlugin); } - public function tearDown() { + public function tearDown(): void { $this->restoreService('AllConfig'); } diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php index 1459e6f6403a..ea246c5c6f9b 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php @@ -75,7 +75,7 @@ class DirectoryTest extends \Test\TestCase { /** @var \OC\Files\FileInfo | \PHPUnit\Framework\MockObject\MockObject */ private $info; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->view = $this->createMock('OC\Files\View', [], [], '', false); diff --git a/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php b/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php index df5403bc595d..bbddea9db928 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DummyGetResponsePluginTest.php @@ -35,7 +35,7 @@ class DummyGetResponsePluginTest extends TestCase { /** @var DummyGetResponsePlugin */ private $dummyGetResponsePlugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dummyGetResponsePlugin = new DummyGetResponsePlugin(); diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php index f5c657a736b2..47a6c7012ccf 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php @@ -69,7 +69,7 @@ class FileTest extends TestCase { /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */ protected $config; - public function setUp() { + public function setUp(): void { parent::setUp(); unset($_SERVER['HTTP_OC_CHUNKED'], $_SERVER['CONTENT_LENGTH'], $_SERVER['REQUEST_METHOD']); @@ -84,7 +84,7 @@ public function setUp() { $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock(); } - public function tearDown() { + public function tearDown(): void { $userManager = \OC::$server->getUserManager(); if ($userManager->userExists($this->user)) { $userManager->get($this->user)->delete(); diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php index a668de333575..5a2b85787390 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php @@ -87,7 +87,7 @@ class FilesPluginTest extends TestCase { */ private $request; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = $this->getMockBuilder(Server::class) ->disableOriginalConstructor() diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php index 1271ceaf6a9e..f2e9452537a5 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php @@ -66,7 +66,7 @@ class FilesReportPluginTest extends \Test\TestCase { /** @var Folder|\PHPUnit\Framework\MockObject\MockObject **/ private $userFolder; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->tree = $this->getMockBuilder('\Sabre\DAV\Tree') ->disableOriginalConstructor() diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesSearchReportPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesSearchReportPluginTest.php index bdeb571d34ab..67efe34bf3b0 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesSearchReportPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesSearchReportPluginTest.php @@ -45,7 +45,7 @@ class FilesSearchReportPluginTest extends \Test\TestCase { /** @var FilesSearchReportPlugin|\PHPUnit\Framework\MockObject\MockObject */ private $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->tree = $this->getMockBuilder(Tree::class) diff --git a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php index 9efaf5edc0ad..d487161cd132 100644 --- a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php @@ -37,7 +37,7 @@ class MaintenancePluginTest extends TestCase { /** @var MaintenancePlugin */ private $maintenancePlugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock('\OCP\IConfig'); diff --git a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php index 77aca9282ef0..be586c122d69 100644 --- a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php @@ -37,7 +37,7 @@ class PrincipalTest extends TestCase { /** @var IGroupManager | \PHPUnit\Framework\MockObject\MockObject */ private $groupManager; - public function setUp() { + public function setUp(): void { $this->userManager = $this->getMockBuilder('\OCP\IUserManager') ->disableOriginalConstructor()->getMock(); $this->groupManager = $this->getMockBuilder('\OCP\IGroupManager') diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php index 556b55558215..24400afd69cb 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/PartFileInRootUploadTest.php @@ -33,18 +33,18 @@ class PartFileInRootUploadTest extends UploadTest { protected $original; - protected function setUp() { + protected function setUp(): void { $config = \OC::$server->getConfig(); $this->original = $config->getSystemValue('part_file_in_storage', null); $config->setSystemValue('part_file_in_storage', false); parent::setUp(); } - protected function tearDown() { + protected function tearDown(): void { if ($this->original !== null) { $config = \OC::$server->getConfig(); $this->original = $config->setSystemValue('part_file_in_storage', $this->original); } - return parent::tearDown(); + parent::tearDown(); } } diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTest.php index 987525050f2a..bbcef1089ec3 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/RequestTest.php @@ -50,7 +50,7 @@ protected function getStream($string) { return $stream; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); unset($_SERVER['HTTP_OC_CHUNKED']); diff --git a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php index 8e5bfc301d24..82dee09b59cc 100644 --- a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php @@ -52,7 +52,7 @@ class SharesPluginTest extends \Test\TestCase { */ private $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = new \Sabre\DAV\Server(); $this->tree = $this->getMockBuilder('\Sabre\DAV\Tree') diff --git a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php index 01d7319d5295..d2b3d8f46726 100644 --- a/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/TagsPluginTest.php @@ -58,7 +58,7 @@ class TagsPluginTest extends \Test\TestCase { */ private $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = new \Sabre\DAV\Server(); $this->tree = $this->getMockBuilder('\Sabre\DAV\Tree') diff --git a/apps/dav/tests/unit/Connector/Sabre/ValidateRequestPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/ValidateRequestPluginTest.php index 2fc5f6333d23..bc34bd2c94d7 100644 --- a/apps/dav/tests/unit/Connector/Sabre/ValidateRequestPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/ValidateRequestPluginTest.php @@ -36,7 +36,7 @@ class ValidateRequestPluginTest extends TestCase { /** @var ValidateRequestPlugin */ private $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = new \Sabre\DAV\Server(); diff --git a/apps/dav/tests/unit/DAV/CopyPluginTest.php b/apps/dav/tests/unit/DAV/CopyPluginTest.php index baf62c9ff29d..96052e51c550 100644 --- a/apps/dav/tests/unit/DAV/CopyPluginTest.php +++ b/apps/dav/tests/unit/DAV/CopyPluginTest.php @@ -48,7 +48,7 @@ class CopyPluginTest extends TestCase { /** @var ResponseInterface | \PHPUnit\Framework\MockObject\MockObject */ private $response; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->plugin = new CopyPlugin(); diff --git a/apps/dav/tests/unit/DAV/FileCustomPropertiesBackendTest.php b/apps/dav/tests/unit/DAV/FileCustomPropertiesBackendTest.php index 4467499f5295..693a47253964 100644 --- a/apps/dav/tests/unit/DAV/FileCustomPropertiesBackendTest.php +++ b/apps/dav/tests/unit/DAV/FileCustomPropertiesBackendTest.php @@ -79,7 +79,7 @@ class FileCustomPropertiesBackendTest extends \Test\TestCase { /** @var int */ private $maxId; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = new \Sabre\DAV\Server(); $this->tree = $this->getMockBuilder(Tree::class) @@ -112,7 +112,7 @@ public function setUp() { ->execute()->fetchColumn(); } - public function tearDown() { + public function tearDown(): void { $connection = \OC::$server->getDatabaseConnection(); $deleteStatement = $connection->prepare( 'DELETE FROM `*PREFIX*properties`' . diff --git a/apps/dav/tests/unit/DAV/GroupPrincipalTest.php b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php index e8efede071d3..fb1f1f3b2abe 100644 --- a/apps/dav/tests/unit/DAV/GroupPrincipalTest.php +++ b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php @@ -36,7 +36,7 @@ class GroupPrincipalTest extends \Test\TestCase { /** @var GroupPrincipalBackend */ private $connector; - public function setUp() { + public function setUp(): void { $this->groupManager = $this->getMockBuilder(IGroupManager::class) ->disableOriginalConstructor()->getMock(); diff --git a/apps/dav/tests/unit/DAV/HookManagerTest.php b/apps/dav/tests/unit/DAV/HookManagerTest.php index d55bac0a5457..a65aa9b852ec 100644 --- a/apps/dav/tests/unit/DAV/HookManagerTest.php +++ b/apps/dav/tests/unit/DAV/HookManagerTest.php @@ -38,7 +38,7 @@ class HookManagerTest extends TestCase { /** @var L10N */ private $l10n; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->l10n = $this->getMockBuilder('OC\L10N\L10N') diff --git a/apps/dav/tests/unit/DAV/LazyOpsPluginTest.php b/apps/dav/tests/unit/DAV/LazyOpsPluginTest.php index 037360c6dc80..628a3a53df88 100644 --- a/apps/dav/tests/unit/DAV/LazyOpsPluginTest.php +++ b/apps/dav/tests/unit/DAV/LazyOpsPluginTest.php @@ -50,7 +50,7 @@ class LazyOpsPluginTest extends TestCase { /** @var IUserSession | \PHPUnit\Framework\MockObject\MockObject */ private $userSession; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userSession = $this->createMock(IUserSession::class); diff --git a/apps/dav/tests/unit/DAV/LockPluginTest.php b/apps/dav/tests/unit/DAV/LockPluginTest.php index 68dfdb19b9f1..c62d0e4db6ac 100644 --- a/apps/dav/tests/unit/DAV/LockPluginTest.php +++ b/apps/dav/tests/unit/DAV/LockPluginTest.php @@ -51,7 +51,7 @@ class LockPluginTest extends TestCase { /** @var IUserSession | \PHPUnit\Framework\MockObject\MockObject */ private $userSession; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->plugin = new LockPlugin(); @@ -67,7 +67,7 @@ public function setUp() { $this->overwriteService('UserSession', $this->userSession); } - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); $this->restoreService('UserSession'); $this->restoreService(LockMapper::class); diff --git a/apps/dav/tests/unit/DAV/MiscCustomPropertiesBackendTest.php b/apps/dav/tests/unit/DAV/MiscCustomPropertiesBackendTest.php index 250ef0e60236..4a3b8675438a 100644 --- a/apps/dav/tests/unit/DAV/MiscCustomPropertiesBackendTest.php +++ b/apps/dav/tests/unit/DAV/MiscCustomPropertiesBackendTest.php @@ -59,7 +59,7 @@ class MiscCustomPropertiesBackendTest extends \Test\TestCase { /** @var int */ private $maxId; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = new \Sabre\DAV\Server(); $this->tree = $this->getMockBuilder('\Sabre\DAV\Tree') @@ -90,7 +90,7 @@ public function setUp() { ->execute()->fetchColumn(); } - public function tearDown() { + public function tearDown(): void { $connection = \OC::$server->getDatabaseConnection(); $deleteStatement = $connection->prepare( 'DELETE FROM `*PREFIX*dav_properties`' . diff --git a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php index f5d13888b03b..36630f874b48 100644 --- a/apps/dav/tests/unit/DAV/Sharing/PluginTest.php +++ b/apps/dav/tests/unit/DAV/Sharing/PluginTest.php @@ -41,7 +41,7 @@ class PluginTest extends TestCase { /** @var IShareable | \PHPUnit\Framework\MockObject\MockObject */ private $book; - public function setUp() { + public function setUp(): void { parent::setUp(); /** @var Auth | \PHPUnit\Framework\MockObject\MockObject $authBackend */ diff --git a/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php b/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php index 577935be7b07..22ec2d64c208 100644 --- a/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php +++ b/apps/dav/tests/unit/DAV/ViewOnlyPluginTest.php @@ -43,7 +43,7 @@ class ViewOnlyPluginTest extends TestCase { /** @var RequestInterface | \PHPUnit\Framework\MockObject\MockObject */ private $request; - public function setUp() { + public function setUp(): void { $this->plugin = new ViewOnlyPlugin( $this->createMock(ILogger::class) ); diff --git a/apps/dav/tests/unit/Files/FileLocksBackendTest.php b/apps/dav/tests/unit/Files/FileLocksBackendTest.php index 7cecd6ada7f7..034871bc4d4d 100644 --- a/apps/dav/tests/unit/Files/FileLocksBackendTest.php +++ b/apps/dav/tests/unit/Files/FileLocksBackendTest.php @@ -49,7 +49,7 @@ class FileLocksBackendTest extends TestCase { /** @var IPersistentLockingStorage | IStorage | \PHPUnit\Framework\MockObject\MockObject */ private $storageOfFileToBeLocked; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->storageOfFileToBeLocked = $this->createMock([IPersistentLockingStorage::class, IStorage::class]); diff --git a/apps/dav/tests/unit/Files/FilesHomeTest.php b/apps/dav/tests/unit/Files/FilesHomeTest.php index ec984fc23927..ae01a2d46995 100644 --- a/apps/dav/tests/unit/Files/FilesHomeTest.php +++ b/apps/dav/tests/unit/Files/FilesHomeTest.php @@ -37,7 +37,7 @@ class FilesHomeTest extends TestCase { /** @var View | \PHPUnit\Framework\MockObject\MockObject */ private $view; - protected function setUp() { + protected function setUp(): void { $this->view = $this->createMock(View::class); $this->filesHome = new FilesHome([ 'uri' => 'principals/users/user01' diff --git a/apps/dav/tests/unit/Files/PreviewPluginTest.php b/apps/dav/tests/unit/Files/PreviewPluginTest.php index 01b08a7e0050..759c917f07e7 100644 --- a/apps/dav/tests/unit/Files/PreviewPluginTest.php +++ b/apps/dav/tests/unit/Files/PreviewPluginTest.php @@ -53,7 +53,7 @@ class PreviewPluginTest extends TestCase { /** @var ResponseInterface| \PHPUnit\Framework\MockObject\MockObject */ private $response; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->previewManager = $this->createMock(IPreview::class); diff --git a/apps/dav/tests/unit/Files/Sharing/PublicLinkEventsPluginTest.php b/apps/dav/tests/unit/Files/Sharing/PublicLinkEventsPluginTest.php index 492f1edd9abe..6007f36297f0 100644 --- a/apps/dav/tests/unit/Files/Sharing/PublicLinkEventsPluginTest.php +++ b/apps/dav/tests/unit/Files/Sharing/PublicLinkEventsPluginTest.php @@ -37,7 +37,7 @@ class PublicLinkEventsPluginTest extends TestCase { /** @var PublicLinkEventsPlugin */ private $publicLinkEventsPlugin; - protected function setUp() { + protected function setUp(): void { $this->dispatcher = $this->createMock(EventDispatcherInterface::class); $this->server = $this->createMock(Server::class); diff --git a/apps/dav/tests/unit/JobStatus/Entity/JobStatusMapperTest.php b/apps/dav/tests/unit/JobStatus/Entity/JobStatusMapperTest.php index 649e99ffdc5c..f101acedd4e6 100644 --- a/apps/dav/tests/unit/JobStatus/Entity/JobStatusMapperTest.php +++ b/apps/dav/tests/unit/JobStatus/Entity/JobStatusMapperTest.php @@ -42,7 +42,7 @@ class JobStatusMapperTest extends TestCase { /** @var JobStatus */ private $testJobStatus; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->database = \OC::$server->getDatabaseConnection(); $this->mapper = new JobStatusMapper($this->database); @@ -54,7 +54,7 @@ public function setUp() { $this->testJobStatus->setStatusInfo(\json_encode([])); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); if ($this->mapper !== null && $this->testJobStatus !== null) { $this->mapper->delete($this->testJobStatus); diff --git a/apps/dav/tests/unit/JobStatus/JobStatusTest.php b/apps/dav/tests/unit/JobStatus/JobStatusTest.php index 124c8f7e9822..e0ab645fdc8d 100644 --- a/apps/dav/tests/unit/JobStatus/JobStatusTest.php +++ b/apps/dav/tests/unit/JobStatus/JobStatusTest.php @@ -40,7 +40,7 @@ class JobStatusTest extends TestCase { /** @var JobStatusMapper | \PHPUnit\Framework\MockObject\MockObject */ private $mapper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->mapper = $this->createMock(JobStatusMapper::class); diff --git a/apps/dav/tests/unit/Meta/MetaPluginTest.php b/apps/dav/tests/unit/Meta/MetaPluginTest.php index cdf502d53e86..8c033567738a 100644 --- a/apps/dav/tests/unit/Meta/MetaPluginTest.php +++ b/apps/dav/tests/unit/Meta/MetaPluginTest.php @@ -48,7 +48,7 @@ class MetaPluginTest extends TestCase { */ private $server; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userSession = $this->createMock(IUserSession::class); diff --git a/apps/dav/tests/unit/Repair/RemoveInvalidSharesTest.php b/apps/dav/tests/unit/Repair/RemoveInvalidSharesTest.php index 361905b7f95b..55f3ce2ab5a2 100644 --- a/apps/dav/tests/unit/Repair/RemoveInvalidSharesTest.php +++ b/apps/dav/tests/unit/Repair/RemoveInvalidSharesTest.php @@ -34,7 +34,7 @@ * @group DB */ class RemoveInvalidSharesTest extends TestCase { - public function setUp() { + public function setUp(): void { parent::setUp(); $db = \OC::$server->getDatabaseConnection(); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php b/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php index 33762e330139..f719edf4fd92 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php @@ -44,7 +44,7 @@ class SystemTagMappingNodeTest extends \Test\TestCase { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tagManager = $this->createMock('\OCP\SystemTag\ISystemTagManager'); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php index 9c9861d6cf02..4e41c16c3619 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php @@ -40,7 +40,7 @@ class SystemTagNodeTest extends \Test\TestCase { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tagManager = $this->createMock('\OCP\SystemTag\ISystemTagManager'); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php index 7274468dea82..5fb19cacdb14 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php @@ -77,7 +77,7 @@ class SystemTagPluginTest extends \Test\TestCase { */ private $plugin; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->tree = $this->getMockBuilder('\Sabre\DAV\Tree') ->disableOriginalConstructor() diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php index a7dc867f3e70..9924d836a0a3 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php @@ -39,7 +39,7 @@ class SystemTagsByIdCollectionTest extends \Test\TestCase { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tagManager = $this->createMock('\OCP\SystemTag\ISystemTagManager'); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php index f00d95c3171b..0283dc5d7233 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php @@ -43,7 +43,7 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tagManager = $this->createMock('\OCP\SystemTag\ISystemTagManager'); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php index 5aa5bb64cfe9..e3eab3de090a 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php @@ -45,7 +45,7 @@ class SystemTagsObjectTypeCollectionTest extends \Test\TestCase { */ private $userFolder; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tagManager = $this->createMock('\OCP\SystemTag\ISystemTagManager'); diff --git a/apps/dav/tests/unit/TrashBin/TrashBinFileTest.php b/apps/dav/tests/unit/TrashBin/TrashBinFileTest.php index f9567519c27c..f1d447c6bf89 100644 --- a/apps/dav/tests/unit/TrashBin/TrashBinFileTest.php +++ b/apps/dav/tests/unit/TrashBin/TrashBinFileTest.php @@ -51,7 +51,7 @@ public function providesExceptions() : array { ]; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $fileInfo = $this->createMock(FileInfo::class); $this->trashBinManager = $this->createMock(TrashBinManager::class); diff --git a/apps/dav/tests/unit/TrashBin/TrashBinFolderTest.php b/apps/dav/tests/unit/TrashBin/TrashBinFolderTest.php index 917ea875fe8d..85e17bb0f309 100644 --- a/apps/dav/tests/unit/TrashBin/TrashBinFolderTest.php +++ b/apps/dav/tests/unit/TrashBin/TrashBinFolderTest.php @@ -42,7 +42,7 @@ class TrashBinFolderTest extends TestCase { */ private $fileInfo; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->fileInfo = $this->createMock(FileInfo::class); $this->trashBinManager = $this->createMock(TrashBinManager::class); diff --git a/apps/dav/tests/unit/TrashBin/TrashBinHomeTest.php b/apps/dav/tests/unit/TrashBin/TrashBinHomeTest.php index adf90bdc3eda..07d3acb7db54 100644 --- a/apps/dav/tests/unit/TrashBin/TrashBinHomeTest.php +++ b/apps/dav/tests/unit/TrashBin/TrashBinHomeTest.php @@ -36,7 +36,7 @@ class TrashBinHomeTest extends TestCase { */ private $trashBinManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->trashBinManager = $this->createMock(TrashBinManager::class); $this->trashBinHome = new TrashBinHome([ diff --git a/apps/dav/tests/unit/TreeTest.php b/apps/dav/tests/unit/TreeTest.php index c4b4027031a0..0a6d716fb05b 100644 --- a/apps/dav/tests/unit/TreeTest.php +++ b/apps/dav/tests/unit/TreeTest.php @@ -45,7 +45,7 @@ public function providesPaths() { ]; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->rootNode = $this->createMock(ICollection::class); diff --git a/apps/dav/tests/unit/Upload/ChunkLocationProviderTest.php b/apps/dav/tests/unit/Upload/ChunkLocationProviderTest.php index 38401e545c16..7eb6ff747173 100644 --- a/apps/dav/tests/unit/Upload/ChunkLocationProviderTest.php +++ b/apps/dav/tests/unit/Upload/ChunkLocationProviderTest.php @@ -39,7 +39,7 @@ class ChunkLocationProviderTest extends TestCase { /** @var IStorageFactory | \PHPUnit\Framework\MockObject\MockObject */ private $factory; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->provider = new ChunkLocationProvider($this->config); diff --git a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php index fee71266cc53..90f9c9db7266 100644 --- a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php +++ b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php @@ -49,7 +49,7 @@ class ChunkingPluginTest extends TestCase { /** @var ResponseInterface | \PHPUnit\Framework\MockObject\MockObject */ private $response; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->server = $this->getMockBuilder('\Sabre\DAV\Server') diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php index 415e033e27e2..d2763a25c598 100644 --- a/apps/federatedfilesharing/tests/AddressHandlerTest.php +++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php @@ -38,7 +38,7 @@ class AddressHandlerTest extends \Test\TestCase { /** @var IL10N | \PHPUnit\Framework\MockObject\MockObject */ private $il10n; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->urlGenerator = $this->createMock('OCP\IURLGenerator'); diff --git a/apps/federatedfilesharing/tests/Command/PollIncomingSharesTest.php b/apps/federatedfilesharing/tests/Command/PollIncomingSharesTest.php index 2c146df53b9a..3b8f1e040614 100644 --- a/apps/federatedfilesharing/tests/Command/PollIncomingSharesTest.php +++ b/apps/federatedfilesharing/tests/Command/PollIncomingSharesTest.php @@ -65,7 +65,7 @@ class PollIncomingSharesTest extends TestCase { */ private $externalManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->dbConnection = $this->createMock(IDBConnection::class); $this->userManager = $this->createMock(IUserManager::class); diff --git a/apps/federatedfilesharing/tests/Controller/OcmControllerTest.php b/apps/federatedfilesharing/tests/Controller/OcmControllerTest.php index 1243da907009..2a953a2ddf1b 100644 --- a/apps/federatedfilesharing/tests/Controller/OcmControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/OcmControllerTest.php @@ -96,7 +96,7 @@ class OcmControllerTest extends TestCase { */ private $shareToken = 'abc'; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerTest.php index 4e8f4e4fbb0a..6da812747fe7 100644 --- a/apps/federatedfilesharing/tests/Controller/RequestHandlerTest.php +++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerTest.php @@ -82,7 +82,7 @@ class RequestHandlerTest extends TestCase { */ private $requestHandlerController; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/federatedfilesharing/tests/Controller/SharingPersonalSettingsControllerTest.php b/apps/federatedfilesharing/tests/Controller/SharingPersonalSettingsControllerTest.php index a5037c447c61..765c98b4739a 100644 --- a/apps/federatedfilesharing/tests/Controller/SharingPersonalSettingsControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/SharingPersonalSettingsControllerTest.php @@ -44,7 +44,7 @@ class SharingPersonalSettingsControllerTest extends TestCase { /** @var SharingPersonalSettingsController $personalSettingsController */ private $sharingPersonalSettingsController; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() diff --git a/apps/federatedfilesharing/tests/DiscoveryManagerTest.php b/apps/federatedfilesharing/tests/DiscoveryManagerTest.php index e9edc6bbc437..7ca1a36c709e 100644 --- a/apps/federatedfilesharing/tests/DiscoveryManagerTest.php +++ b/apps/federatedfilesharing/tests/DiscoveryManagerTest.php @@ -38,7 +38,7 @@ class DiscoveryManagerTest extends \Test\TestCase { /** @var DiscoveryManager */ private $discoveryManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->cache = $this->createMock('\OCP\ICache'); /** @var ICacheFactory $cacheFactory */ diff --git a/apps/federatedfilesharing/tests/FedShareManagerTest.php b/apps/federatedfilesharing/tests/FedShareManagerTest.php index 226f9e6cdf60..b089e87f4a41 100644 --- a/apps/federatedfilesharing/tests/FedShareManagerTest.php +++ b/apps/federatedfilesharing/tests/FedShareManagerTest.php @@ -71,7 +71,7 @@ class FedShareManagerTest extends TestCase { /** @var EventDispatcherInterface | \PHPUnit\Framework\MockObject\MockObject */ private $eventDispatcher; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->federatedShareProvider = $this->getMockBuilder( diff --git a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php index f5a7ddea4483..bf029a6a11be 100644 --- a/apps/federatedfilesharing/tests/FederatedShareProviderTest.php +++ b/apps/federatedfilesharing/tests/FederatedShareProviderTest.php @@ -79,7 +79,7 @@ class FederatedShareProviderTest extends \Test\TestCase { /** @var FederatedShareProvider */ protected $provider; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -121,10 +121,10 @@ public function setUp() { $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/Middleware/OcmMiddlewareTest.php b/apps/federatedfilesharing/tests/Middleware/OcmMiddlewareTest.php index 8c3151f8ddcc..087e29d479cc 100644 --- a/apps/federatedfilesharing/tests/Middleware/OcmMiddlewareTest.php +++ b/apps/federatedfilesharing/tests/Middleware/OcmMiddlewareTest.php @@ -71,7 +71,7 @@ class OcmMiddlewareTest extends TestCase { */ private $logger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->federatedShareProvider = $this->createMock( diff --git a/apps/federatedfilesharing/tests/NotificationsTest.php b/apps/federatedfilesharing/tests/NotificationsTest.php index 8d807ddd1858..222dc35fbb48 100644 --- a/apps/federatedfilesharing/tests/NotificationsTest.php +++ b/apps/federatedfilesharing/tests/NotificationsTest.php @@ -57,7 +57,7 @@ class NotificationsTest extends \Test\TestCase { /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->jobList = $this->createMock(IJobList::class); diff --git a/apps/federatedfilesharing/tests/Ocm/PermissionsTest.php b/apps/federatedfilesharing/tests/Ocm/PermissionsTest.php index f2734c597d20..107b2500c529 100644 --- a/apps/federatedfilesharing/tests/Ocm/PermissionsTest.php +++ b/apps/federatedfilesharing/tests/Ocm/PermissionsTest.php @@ -37,7 +37,7 @@ class PermissionsTest extends TestCase { */ private $permissions; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->permissions = new Permissions(); } diff --git a/apps/federatedfilesharing/tests/Panels/AdminPanelTest.php b/apps/federatedfilesharing/tests/Panels/AdminPanelTest.php index da0da9c64a7f..ffdff2aec740 100644 --- a/apps/federatedfilesharing/tests/Panels/AdminPanelTest.php +++ b/apps/federatedfilesharing/tests/Panels/AdminPanelTest.php @@ -37,7 +37,7 @@ class AdminPanelTest extends \Test\TestCase { /** @var IConfig */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->shareProvider = $this->getMockBuilder(FederatedShareProvider::class) ->disableOriginalConstructor() diff --git a/apps/federatedfilesharing/tests/Panels/GeneralPersonalPanelTest.php b/apps/federatedfilesharing/tests/Panels/GeneralPersonalPanelTest.php index 209abea65e6b..950cbb47f636 100644 --- a/apps/federatedfilesharing/tests/Panels/GeneralPersonalPanelTest.php +++ b/apps/federatedfilesharing/tests/Panels/GeneralPersonalPanelTest.php @@ -47,7 +47,7 @@ class GeneralPersonalPanelTest extends \Test\TestCase { /** @var IRequest */ private $request; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->l = $this->getMockBuilder(IL10N::class)->getMock(); $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->getMock(); diff --git a/apps/federatedfilesharing/tests/Panels/SharingPersonalPanelTest.php b/apps/federatedfilesharing/tests/Panels/SharingPersonalPanelTest.php index 32b0775c4603..a7982cd87e52 100644 --- a/apps/federatedfilesharing/tests/Panels/SharingPersonalPanelTest.php +++ b/apps/federatedfilesharing/tests/Panels/SharingPersonalPanelTest.php @@ -36,7 +36,7 @@ class SharingPersonalPanelTest extends \Test\TestCase { /** @var SharingPersonalPanel $personalPanel */ private $sharingPersonalPanel; - protected function setUp() { + protected function setUp(): void { $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); diff --git a/apps/federatedfilesharing/tests/TestCase.php b/apps/federatedfilesharing/tests/TestCase.php index 61cde056f386..b38498062527 100644 --- a/apps/federatedfilesharing/tests/TestCase.php +++ b/apps/federatedfilesharing/tests/TestCase.php @@ -47,7 +47,7 @@ public static function setUpBeforeClass() { \OC::$server->getGroupManager()->clearBackends(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->createUser(self::TEST_FILES_SHARING_API_USER1, self::TEST_FILES_SHARING_API_USER1); @@ -57,7 +57,7 @@ protected function setUp() { 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 5c404210a962..9037f5711562 100644 --- a/apps/federatedfilesharing/tests/TokenHandlerTest.php +++ b/apps/federatedfilesharing/tests/TokenHandlerTest.php @@ -37,7 +37,7 @@ class TokenHandlerTest extends \Test\TestCase { /** @var int */ private $expectedTokenLength = 15; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->secureRandom = $this->createMock('OCP\Security\ISecureRandom'); diff --git a/apps/federation/tests/API/OCSAuthAPITest.php b/apps/federation/tests/API/OCSAuthAPITest.php index c3b73c067525..ad406075546e 100644 --- a/apps/federation/tests/API/OCSAuthAPITest.php +++ b/apps/federation/tests/API/OCSAuthAPITest.php @@ -56,7 +56,7 @@ class OCSAuthAPITest extends TestCase { /** @var OCSAuthAPIController */ private $ocsAuthApi; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php index 2899c7f01ba7..c000df5540ca 100644 --- a/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/GetSharedSecretTest.php @@ -67,7 +67,7 @@ class GetSharedSecretTest extends TestCase { /** @var GetSharedSecret */ private $getSharedSecret; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->httpClient = $this->createMock('OCP\Http\Client\IClient'); diff --git a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php index 6681dd4f28ce..b705f2174f80 100644 --- a/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php +++ b/apps/federation/tests/BackgroundJob/RequestSharedSecretTest.php @@ -56,7 +56,7 @@ class RequestSharedSecretTest extends TestCase { /** @var RequestSharedSecret */ private $requestSharedSecret; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->httpClient = $this->createMock('OCP\Http\Client\IClient'); diff --git a/apps/federation/tests/Controller/SettingsControllerTest.php b/apps/federation/tests/Controller/SettingsControllerTest.php index 9086409e405d..bc3bb70ea7cd 100644 --- a/apps/federation/tests/Controller/SettingsControllerTest.php +++ b/apps/federation/tests/Controller/SettingsControllerTest.php @@ -40,7 +40,7 @@ class SettingsControllerTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject | \OCA\Federation\TrustedServers */ private $trustedServers; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock('OCP\IRequest'); diff --git a/apps/federation/tests/DbHandlerTest.php b/apps/federation/tests/DbHandlerTest.php index 8ad1bc06ebd4..78754070f579 100644 --- a/apps/federation/tests/DbHandlerTest.php +++ b/apps/federation/tests/DbHandlerTest.php @@ -46,7 +46,7 @@ class DbHandlerTest extends TestCase { /** @var string */ private $dbTable = 'trusted_servers'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -62,7 +62,7 @@ public function setUp() { $this->assertEmpty($result, 'we need to start with a empty trusted_servers table'); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $query = $this->connection->getQueryBuilder()->delete($this->dbTable); $query->execute(); diff --git a/apps/federation/tests/HooksTest.php b/apps/federation/tests/HooksTest.php index 9cd0085048f0..de1f6a050159 100644 --- a/apps/federation/tests/HooksTest.php +++ b/apps/federation/tests/HooksTest.php @@ -34,7 +34,7 @@ class HooksTest extends TestCase { /** @var Hooks */ private $hooks; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->trustedServers = $this->getMockBuilder('OCA\Federation\TrustedServers') diff --git a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php index 2e870b706286..21be6a28b7b5 100644 --- a/apps/federation/tests/Middleware/AddServerMiddlewareTest.php +++ b/apps/federation/tests/Middleware/AddServerMiddlewareTest.php @@ -43,7 +43,7 @@ class AddServerMiddlewareTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject | Controller */ private $controller; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = $this->createMock('OCP\ILogger'); diff --git a/apps/federation/tests/PanelTest.php b/apps/federation/tests/PanelTest.php index 48880cb413ef..6b5f53246576 100644 --- a/apps/federation/tests/PanelTest.php +++ b/apps/federation/tests/PanelTest.php @@ -57,7 +57,7 @@ class PanelTest extends \Test\TestCase { /** @var EventDispatcherInterface */ private $eventDispatcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = $this->getMockBuilder(IDBConnection::class)->getMock(); $this->l = $this->getMockBuilder(IL10N::class)->getMock(); diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php index 387f5ee23a68..f4f6310d5648 100644 --- a/apps/federation/tests/TrustedServersTest.php +++ b/apps/federation/tests/TrustedServersTest.php @@ -68,7 +68,7 @@ class TrustedServersTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject | EventDispatcherInterface */ private $dispatcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dbHandler = $this->getMockBuilder('\OCA\Federation\DbHandler') diff --git a/apps/files/tests/ActivityHelperTest.php b/apps/files/tests/ActivityHelperTest.php index e2c04ea276e8..dcfd72b9ab8f 100644 --- a/apps/files/tests/ActivityHelperTest.php +++ b/apps/files/tests/ActivityHelperTest.php @@ -52,7 +52,7 @@ class ActivityHelperTest extends \Test\TestCase { */ private $user; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tags = $this->createMock(ITags::class); diff --git a/apps/files/tests/ActivityTest.php b/apps/files/tests/ActivityTest.php index 3206fe0db97b..d083f07eb7f3 100644 --- a/apps/files/tests/ActivityTest.php +++ b/apps/files/tests/ActivityTest.php @@ -55,7 +55,7 @@ class ActivityTest extends TestCase { /** @var \OCA\Files\Activity */ protected $activityExtension; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder('OCP\IRequest') diff --git a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php index 4c00b888783c..c40a7e9ab791 100644 --- a/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php +++ b/apps/files/tests/BackgroundJob/DeleteOrphanedItemsJobTest.php @@ -37,7 +37,7 @@ class DeleteOrphanedItemsJobTest extends \Test\TestCase { /** @var \OCP\IDBConnection */ protected $connection; - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); } diff --git a/apps/files/tests/BackgroundJob/ScanFilesTest.php b/apps/files/tests/BackgroundJob/ScanFilesTest.php index 6650e7be089e..50dcbb60b7d5 100644 --- a/apps/files/tests/BackgroundJob/ScanFilesTest.php +++ b/apps/files/tests/BackgroundJob/ScanFilesTest.php @@ -39,7 +39,7 @@ class ScanFilesTest extends TestCase { /** @var ScanFiles */ private $scanFiles; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock('\OCP\IConfig'); diff --git a/apps/files/tests/CapabilitiesTest.php b/apps/files/tests/CapabilitiesTest.php index 54b13e4e3f0a..70af42962fe5 100644 --- a/apps/files/tests/CapabilitiesTest.php +++ b/apps/files/tests/CapabilitiesTest.php @@ -34,7 +34,7 @@ class CapabilitiesTest extends TestCase { /** @var Capabilities */ protected $capabilities; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/apps/files/tests/Command/DeleteOrphanedFilesTest.php b/apps/files/tests/Command/DeleteOrphanedFilesTest.php index 6524a8380064..7ead597e0755 100644 --- a/apps/files/tests/Command/DeleteOrphanedFilesTest.php +++ b/apps/files/tests/Command/DeleteOrphanedFilesTest.php @@ -52,7 +52,7 @@ class DeleteOrphanedFilesTest extends TestCase { */ private $user1; - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -65,7 +65,7 @@ protected function setup() { $this->command = new DeleteOrphanedFiles($this->connection); } - protected function tearDown() { + protected function tearDown(): void { $userManager = \OC::$server->getUserManager(); $user1 = $userManager->get($this->user1); if ($user1) { diff --git a/apps/files/tests/Command/ScanTest.php b/apps/files/tests/Command/ScanTest.php index 76c1419e4243..fad75d0973a0 100644 --- a/apps/files/tests/Command/ScanTest.php +++ b/apps/files/tests/Command/ScanTest.php @@ -94,7 +94,7 @@ class ScanTest extends TestCase { */ private $groupsCreated = []; - protected function setUp() { + protected function setUp(): void { if ($this->runsWithPrimaryObjectstorage()) { $this->markTestSkipped('not testing scanner as it does not make sense for primary object store'); } @@ -131,7 +131,7 @@ protected function setUp() { @\mkdir($this->dataDir . '/' . $this->scanUser1->getUID() . '/files/toscan', 0777, true); } - protected function tearDown() { + protected function tearDown(): void { foreach ($this->groupsCreated as $group) { $this->groupManager->get($group)->delete(); } diff --git a/apps/files/tests/Command/TransferOwnershipTest.php b/apps/files/tests/Command/TransferOwnershipTest.php index 1e4c38f94889..c7364a0bd5fc 100644 --- a/apps/files/tests/Command/TransferOwnershipTest.php +++ b/apps/files/tests/Command/TransferOwnershipTest.php @@ -87,7 +87,7 @@ class TransferOwnershipTest extends TestCase { */ private $commandTester; - protected function setup() { + protected function setup(): void { parent::setUp(); $this->userManager = \OC::$server->getUserManager(); $this->shareManager = \OC::$server->getShareManager(); @@ -113,7 +113,7 @@ protected function setup() { ); $this->commandTester = new CommandTester($command); } - protected function tearDown() { + protected function tearDown(): void { $this->tearDownUserTrait(); $this->shareManager->userDeleted('share-receiver'); $this->shareManager->userDeleted($this->sourceUser->getUID()); diff --git a/apps/files/tests/Command/VerifyChecksumsTest.php b/apps/files/tests/Command/VerifyChecksumsTest.php index 6d49c0bfe1a1..4b9602f9997c 100644 --- a/apps/files/tests/Command/VerifyChecksumsTest.php +++ b/apps/files/tests/Command/VerifyChecksumsTest.php @@ -43,7 +43,7 @@ class VerifyChecksumsTest extends TestCase { */ private $testFiles; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = \OC::$server->getRootFolder(); diff --git a/apps/files/tests/Controller/ApiControllerTest.php b/apps/files/tests/Controller/ApiControllerTest.php index 0cdf158d44ce..dfa113e43de0 100644 --- a/apps/files/tests/Controller/ApiControllerTest.php +++ b/apps/files/tests/Controller/ApiControllerTest.php @@ -59,7 +59,7 @@ class ApiControllerTest extends TestCase { /** @var \OCP\IConfig */ private $config; - public function setUp() { + public function setUp(): void { $this->request = $this->getMockBuilder('\OCP\IRequest') ->disableOriginalConstructor() ->getMock(); diff --git a/apps/files/tests/Controller/ViewControllerTest.php b/apps/files/tests/Controller/ViewControllerTest.php index 5001e9522e5c..d91016058b34 100644 --- a/apps/files/tests/Controller/ViewControllerTest.php +++ b/apps/files/tests/Controller/ViewControllerTest.php @@ -68,7 +68,7 @@ class ViewControllerTest extends TestCase { /** @var Folder | \PHPUnit\Framework\MockObject\MockObject */ private $rootFolder; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock('\OCP\IRequest'); $this->urlGenerator = $this->createMock('\OCP\IURLGenerator'); diff --git a/apps/files/tests/Service/TagServiceTest.php b/apps/files/tests/Service/TagServiceTest.php index 8cf7bb291255..3497cd206172 100644 --- a/apps/files/tests/Service/TagServiceTest.php +++ b/apps/files/tests/Service/TagServiceTest.php @@ -58,7 +58,7 @@ class TagServiceTest extends \Test\TestCase { */ private $tagManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->getUniqueID('user'); $user = $this->createUser($this->user, 'test'); @@ -81,7 +81,7 @@ protected function setUp() { ); } - protected function tearDown() { + protected function tearDown(): void { \OC_User::setUserId(''); parent::tearDown(); } diff --git a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php index 2d4e2771c64c..d99b1c7b2856 100644 --- a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php @@ -28,7 +28,7 @@ use OCP\Files\External\IStoragesBackendService; class GlobalStoragesControllerTest extends StoragesControllerTest { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->service = $this->createMock('\OCP\Files\External\Service\IGlobalStoragesService'); diff --git a/apps/files_external/tests/Controller/StoragesControllerTest.php b/apps/files_external/tests/Controller/StoragesControllerTest.php index 001a3b38994a..763b460e0cee 100644 --- a/apps/files_external/tests/Controller/StoragesControllerTest.php +++ b/apps/files_external/tests/Controller/StoragesControllerTest.php @@ -41,12 +41,12 @@ abstract class StoragesControllerTest extends \Test\TestCase { */ protected $service; - public function setUp() { + public function setUp(): void { \OC_Mount_Config::$skipTest = true; \OC::$server->getSystemConfig()->setValue('files_external_allow_create_new_local', true); } - public function tearDown() { + public function tearDown(): void { \OC_Mount_Config::$skipTest = false; \OC::$server->getSystemConfig()->setValue('files_external_allow_create_new_local', false); } diff --git a/apps/files_external/tests/Controller/UserStoragesControllerTest.php b/apps/files_external/tests/Controller/UserStoragesControllerTest.php index cd0b9a6af915..ce36f407ff12 100644 --- a/apps/files_external/tests/Controller/UserStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/UserStoragesControllerTest.php @@ -36,7 +36,7 @@ class UserStoragesControllerTest extends StoragesControllerTest { */ private $oldAllowedBackends; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->service = $this->createMock('\OCP\Files\External\Service\IUserStoragesService'); diff --git a/apps/files_external/tests/Panels/AdminTest.php b/apps/files_external/tests/Panels/AdminTest.php index a1d2f31547af..d15a99681dac 100644 --- a/apps/files_external/tests/Panels/AdminTest.php +++ b/apps/files_external/tests/Panels/AdminTest.php @@ -43,7 +43,7 @@ class AdminTest extends \Test\TestCase { /** @var IConfig */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->backendService = $this->createMock(IStoragesBackendService::class); $this->storagesService = $this->createMock(IGlobalStoragesService::class); diff --git a/apps/files_external/tests/Panels/PersonalTest.php b/apps/files_external/tests/Panels/PersonalTest.php index 0f00813b3105..e50920030532 100644 --- a/apps/files_external/tests/Panels/PersonalTest.php +++ b/apps/files_external/tests/Panels/PersonalTest.php @@ -43,7 +43,7 @@ class PersonalTest extends \Test\TestCase { /** @var Manager */ private $encManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->backendService = $this->createMock(IStoragesBackendService::class); $this->storagesService = $this->createMock(IUserStoragesService::class); diff --git a/apps/files_external/tests/Storage/GoogleTest.php b/apps/files_external/tests/Storage/GoogleTest.php index 0d93506f6377..7b8b9b565d8c 100644 --- a/apps/files_external/tests/Storage/GoogleTest.php +++ b/apps/files_external/tests/Storage/GoogleTest.php @@ -41,7 +41,7 @@ class GoogleTest extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = include('files_external/tests/config.php'); @@ -53,7 +53,7 @@ protected function setUp() { $this->instance = new Google($this->config['google']); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir('/'); } diff --git a/apps/files_external/tests/Storage/OwncloudTest.php b/apps/files_external/tests/Storage/OwncloudTest.php index 20f7876f4b42..5900e443ec3c 100644 --- a/apps/files_external/tests/Storage/OwncloudTest.php +++ b/apps/files_external/tests/Storage/OwncloudTest.php @@ -37,7 +37,7 @@ class OwncloudTest extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -50,7 +50,7 @@ protected function setUp() { $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 706c5b7a7853..4625f9283a3c 100644 --- a/apps/files_external/tests/Storage/SFTP_KeyTest.php +++ b/apps/files_external/tests/Storage/SFTP_KeyTest.php @@ -37,7 +37,7 @@ class SFTP_KeyTest extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -51,7 +51,7 @@ protected function setUp() { $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 6f48366264b2..a1813ba3a2be 100644 --- a/apps/files_external/tests/Storage/SftpTest.php +++ b/apps/files_external/tests/Storage/SftpTest.php @@ -44,7 +44,7 @@ class SftpTest extends \Test\Files\Storage\Storage { private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -57,7 +57,7 @@ protected function setUp() { $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 271271503352..7a8d26578411 100644 --- a/apps/files_external/tests/Storage/SmbTest.php +++ b/apps/files_external/tests/Storage/SmbTest.php @@ -37,7 +37,7 @@ * @package OCA\Files_External\Tests\Storage */ class SmbTest extends \Test\Files\Storage\Storage { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); $config = include 'files_external/tests/config.smb.php'; @@ -52,7 +52,7 @@ protected function setUp() { $this->assertTrue($this->instance->mkdir('/'), 'Failed to create a root dir'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir(''); // force disconnect of the client diff --git a/apps/files_external/tests/Storage/WebdavTest.php b/apps/files_external/tests/Storage/WebdavTest.php index b22c7615cf94..daec691331d3 100644 --- a/apps/files_external/tests/Storage/WebdavTest.php +++ b/apps/files_external/tests/Storage/WebdavTest.php @@ -36,7 +36,7 @@ * @package OCA\Files_External\Tests\Storage */ class WebdavTest extends \Test\Files\Storage\Storage { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $id = $this->getUniqueID(); @@ -52,7 +52,7 @@ protected function setUp() { $this->instance->mkdir('/'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->rmdir('/'); } diff --git a/apps/files_sharing/tests/API/ShareesTest.php b/apps/files_sharing/tests/API/ShareesTest.php index dca172ef5998..7b6869fcd46b 100644 --- a/apps/files_sharing/tests/API/ShareesTest.php +++ b/apps/files_sharing/tests/API/ShareesTest.php @@ -81,7 +81,7 @@ class ShareesTest extends TestCase { /** @var UserSearch|\PHPUnit\Framework\MockObject\MockObject */ protected $userSearch; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->getMockBuilder(IUserManager::class) diff --git a/apps/files_sharing/tests/ActivityTest.php b/apps/files_sharing/tests/ActivityTest.php index 95c2a57d8e34..f7494ea4d6b8 100644 --- a/apps/files_sharing/tests/ActivityTest.php +++ b/apps/files_sharing/tests/ActivityTest.php @@ -40,7 +40,7 @@ class ActivityTest extends TestCase { */ private $activity; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->activity = new Activity( $this->getMockBuilder('OCP\L10N\IFactory') diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index 10a55f308b06..1cc798fa1cc5 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -52,7 +52,7 @@ class ApiTest extends TestCase { /** @var string */ private $subsubfolder; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC::$server->getAppConfig()->setValue('core', 'shareapi_exclude_groups', 'no'); @@ -75,7 +75,7 @@ protected function setUp() { $this->userFolder = \OC::$server->getUserFolder(self::TEST_FILES_SHARING_API_USER1); } - protected function tearDown() { + protected function tearDown(): void { if ($this->view instanceof \OC\Files\View) { $this->view->unlink($this->filename); $this->view->deleteAll($this->folder); diff --git a/apps/files_sharing/tests/BackendTest.php b/apps/files_sharing/tests/BackendTest.php index 704ab2d5f755..eb31b14c876a 100644 --- a/apps/files_sharing/tests/BackendTest.php +++ b/apps/files_sharing/tests/BackendTest.php @@ -37,7 +37,7 @@ class BackendTest extends TestCase { public $subfolder; public $subsubfolder; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->folder = self::TEST_FOLDER_NAME; @@ -56,7 +56,7 @@ protected function setUp() { $this->view->file_put_contents($this->folder . $this->subfolder . $this->subsubfolder . $this->filename, $this->data); } - protected function tearDown() { + protected function tearDown(): void { if ($this->view) { $this->view->unlink($this->filename); $this->view->deleteAll($this->folder); diff --git a/apps/files_sharing/tests/CacheTest.php b/apps/files_sharing/tests/CacheTest.php index 7fe77f4d96a9..42987a908858 100644 --- a/apps/files_sharing/tests/CacheTest.php +++ b/apps/files_sharing/tests/CacheTest.php @@ -58,7 +58,7 @@ class CacheTest extends TestCase { /** @var \OCP\Share\IManager */ protected $shareManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->shareManager = \OC::$server->getShareManager(); @@ -123,7 +123,7 @@ protected function setUp() { $this->sharedCache = $this->sharedStorage->getCache(); } - protected function tearDown() { + protected function tearDown(): void { if ($this->sharedCache) { $this->sharedCache->clear(); } diff --git a/apps/files_sharing/tests/CapabilitiesTest.php b/apps/files_sharing/tests/CapabilitiesTest.php index b2f76cd30e09..b574982dca3f 100644 --- a/apps/files_sharing/tests/CapabilitiesTest.php +++ b/apps/files_sharing/tests/CapabilitiesTest.php @@ -43,7 +43,7 @@ class CapabilitiesTest extends \Test\TestCase { /** * */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userSearch = $this->getMockBuilder(\OCP\Util\UserSearch::class) ->disableOriginalConstructor() diff --git a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php index b7c707db7734..3b359e9fbe2e 100644 --- a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php +++ b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php @@ -54,7 +54,7 @@ class CleanupRemoteStoragesTest extends TestCase { ['notExistingId' => 'shared::c34568c143cdac7d2f06e0800b5280f9', 'share_token' => 'f2c69dad1dc0649f26976fd210fc62e7', 'remote' => 'https://hostname.tld/owncloud7', 'user' => 'user7'], ]; - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -107,7 +107,7 @@ protected function setup() { $this->command = new CleanupRemoteStorages($this->connection); } - public function tearDown() { + public function tearDown(): void { $storageQuery = \OC::$server->getDatabaseConnection()->getQueryBuilder(); $storageQuery->delete('storages') ->where($storageQuery->expr()->eq('id', $storageQuery->createParameter('id'))); @@ -130,7 +130,7 @@ public function tearDown() { } } - return parent::tearDown(); + parent::tearDown(); } private function doesStorageExist($numericId) { diff --git a/apps/files_sharing/tests/Controller/NotificationControllerTest.php b/apps/files_sharing/tests/Controller/NotificationControllerTest.php index afcf67aed314..bf29e857b5b3 100644 --- a/apps/files_sharing/tests/Controller/NotificationControllerTest.php +++ b/apps/files_sharing/tests/Controller/NotificationControllerTest.php @@ -51,7 +51,7 @@ class NotificationControllerTest extends TestCase { /** @var NotificationController $notificationController */ private $notificationController; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); $this->mailNotifications = $this->createMock(MailNotifications::class); diff --git a/apps/files_sharing/tests/Controller/PersonalSettingsControllerTest.php b/apps/files_sharing/tests/Controller/PersonalSettingsControllerTest.php index b023725a0a5b..42e2244b287c 100644 --- a/apps/files_sharing/tests/Controller/PersonalSettingsControllerTest.php +++ b/apps/files_sharing/tests/Controller/PersonalSettingsControllerTest.php @@ -44,7 +44,7 @@ class PersonalSettingsControllerTest extends TestCase { /** @var PersonalSettingsController $personalSettingsController */ private $personalSettingsController; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() diff --git a/apps/files_sharing/tests/Controller/Share20OcsControllerTest.php b/apps/files_sharing/tests/Controller/Share20OcsControllerTest.php index f1708e61a6be..c4e21cd694b8 100644 --- a/apps/files_sharing/tests/Controller/Share20OcsControllerTest.php +++ b/apps/files_sharing/tests/Controller/Share20OcsControllerTest.php @@ -104,7 +104,7 @@ class Share20OcsControllerTest extends TestCase { /** @var IConfig */ private $config; - protected function setUp() { + protected function setUp(): void { $this->shareManager = $this->getMockBuilder(IManager::class) ->disableOriginalConstructor() ->getMock(); @@ -162,7 +162,7 @@ protected function setUp() { ); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); } diff --git a/apps/files_sharing/tests/Controllers/ExternalShareControllerTest.php b/apps/files_sharing/tests/Controllers/ExternalShareControllerTest.php index 34ac1c625d80..d54c637b2285 100644 --- a/apps/files_sharing/tests/Controllers/ExternalShareControllerTest.php +++ b/apps/files_sharing/tests/Controllers/ExternalShareControllerTest.php @@ -44,7 +44,7 @@ class ExternalShareControllerTest extends \Test\TestCase { /** @var IClientService */ private $clientService; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder('\\OCP\\IRequest') ->disableOriginalConstructor()->getMock(); diff --git a/apps/files_sharing/tests/Controllers/ShareControllerTest.php b/apps/files_sharing/tests/Controllers/ShareControllerTest.php index a8e49f9707b5..eb5de966e60a 100644 --- a/apps/files_sharing/tests/Controllers/ShareControllerTest.php +++ b/apps/files_sharing/tests/Controllers/ShareControllerTest.php @@ -74,7 +74,7 @@ class ShareControllerTest extends \Test\TestCase { /** @var EventDispatcher | \PHPUnit\Framework\MockObject\MockObject */ private $eventDispatcher; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appName = 'files_sharing'; @@ -112,7 +112,7 @@ protected function setUp() { $this->loginAsUser($this->user); } - protected function tearDown() { + protected function tearDown(): void { \OC_Util::tearDownFS(); \OC_User::setUserId(''); Filesystem::tearDown(); diff --git a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php index 508b51caa1a0..d5ff9402c8d7 100644 --- a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php +++ b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php @@ -68,13 +68,13 @@ public static function setUpBeforeClass() { \OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin'); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { if (self::$trashBinStatus) { \OC::$server->getAppManager()->enableApp('files_trashbin'); } } - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -93,7 +93,7 @@ protected function setup() { $this->job = new DeleteOrphanedSharesJob(); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->executeUpdate('DELETE FROM `*PREFIX*share`'); $userManager = \OC::$server->getUserManager(); diff --git a/apps/files_sharing/tests/ExpireSharesJobTest.php b/apps/files_sharing/tests/ExpireSharesJobTest.php index 0091cd85fb17..ec42ec220cd1 100644 --- a/apps/files_sharing/tests/ExpireSharesJobTest.php +++ b/apps/files_sharing/tests/ExpireSharesJobTest.php @@ -54,7 +54,7 @@ class ExpireSharesJobTest extends \Test\TestCase { */ private $user2; - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -73,7 +73,7 @@ protected function setup() { $this->job = new ExpireSharesJob(); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->executeUpdate('DELETE FROM `*PREFIX*share`'); $userManager = \OC::$server->getUserManager(); diff --git a/apps/files_sharing/tests/External/CacheTest.php b/apps/files_sharing/tests/External/CacheTest.php index 65e061cff2ca..b10d7f659205 100644 --- a/apps/files_sharing/tests/External/CacheTest.php +++ b/apps/files_sharing/tests/External/CacheTest.php @@ -49,7 +49,7 @@ class CacheTest extends TestCase { */ private $remoteUser; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->remoteUser = $this->getUniqueID('remoteuser'); @@ -76,7 +76,7 @@ protected function setUp() { ); } - protected function tearDown() { + protected function tearDown(): void { if ($this->cache) { $this->cache->clear(); } diff --git a/apps/files_sharing/tests/External/ManagerTest.php b/apps/files_sharing/tests/External/ManagerTest.php index e4fd6b4912d8..a55f05b29ccb 100644 --- a/apps/files_sharing/tests/External/ManagerTest.php +++ b/apps/files_sharing/tests/External/ManagerTest.php @@ -62,7 +62,7 @@ class ManagerTest extends TestCase { private $user; private $mountProvider; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->uid = $this->getUniqueID('user'); diff --git a/apps/files_sharing/tests/External/MountProviderTest.php b/apps/files_sharing/tests/External/MountProviderTest.php index 8965de004b7b..f8236452d125 100644 --- a/apps/files_sharing/tests/External/MountProviderTest.php +++ b/apps/files_sharing/tests/External/MountProviderTest.php @@ -43,7 +43,7 @@ class MountProviderTest extends TestCase { /** @var MountProvider */ private $mountProvider; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dbConnection = $this->createMock(IDBConnection::class); $this->mountProvider = new MountProvider($this->dbConnection, function () { diff --git a/apps/files_sharing/tests/HooksTest.php b/apps/files_sharing/tests/HooksTest.php index c2bba4cf96f4..61599e1c69b9 100644 --- a/apps/files_sharing/tests/HooksTest.php +++ b/apps/files_sharing/tests/HooksTest.php @@ -84,7 +84,7 @@ class HooksTest extends \Test\TestCase { */ private $hooks; - public function setUp() { + public function setUp(): void { $this->eventDispatcher = new EventDispatcher(); $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->rootFolder = $this->createMock(IRootFolder::class); diff --git a/apps/files_sharing/tests/LockingTest.php b/apps/files_sharing/tests/LockingTest.php index a07c96c9ccf2..e5a556740e21 100644 --- a/apps/files_sharing/tests/LockingTest.php +++ b/apps/files_sharing/tests/LockingTest.php @@ -43,7 +43,7 @@ class LockingTest extends TestCase { private $ownerUid; private $recipientUid; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->ownerUid = $this->getUniqueID('owner_'); diff --git a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php index 4c2d1000817a..2a08cc92f386 100644 --- a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php +++ b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php @@ -45,7 +45,7 @@ class SharingCheckMiddlewareTest extends \Test\TestCase { /** @var IControllerMethodReflector */ private $reflector; - protected function setUp() { + protected function setUp(): void { $this->config = $this->getMockBuilder('\OCP\IConfig') ->disableOriginalConstructor()->getMock(); $this->appManager = $this->getMockBuilder('\OCP\App\IAppManager') diff --git a/apps/files_sharing/tests/MigrationTest.php b/apps/files_sharing/tests/MigrationTest.php index b220d6435dfd..754bfe981a9a 100644 --- a/apps/files_sharing/tests/MigrationTest.php +++ b/apps/files_sharing/tests/MigrationTest.php @@ -42,7 +42,7 @@ class MigrationTest extends TestCase { private $table = 'share'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -51,7 +51,7 @@ public function setUp() { $this->cleanDB(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $this->cleanDB(); } diff --git a/apps/files_sharing/tests/MountProviderTest.php b/apps/files_sharing/tests/MountProviderTest.php index 4766ebd71212..20a26ca6132c 100644 --- a/apps/files_sharing/tests/MountProviderTest.php +++ b/apps/files_sharing/tests/MountProviderTest.php @@ -54,7 +54,7 @@ class MountProviderTest extends \Test\TestCase { /** @var ILogger | \PHPUnit\Framework\MockObject\MockObject */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock('OCP\IConfig'); diff --git a/apps/files_sharing/tests/NotifierTest.php b/apps/files_sharing/tests/NotifierTest.php index b39dd5bdc9a2..68a971b5ae8a 100644 --- a/apps/files_sharing/tests/NotifierTest.php +++ b/apps/files_sharing/tests/NotifierTest.php @@ -55,7 +55,7 @@ class NotifierTest extends \Test\TestCase { /** @var IConfig */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->notificationManager = $this->getMockBuilder(INotificationManager::class) diff --git a/apps/files_sharing/tests/Panels/Admin/SettingsPanelTest.php b/apps/files_sharing/tests/Panels/Admin/SettingsPanelTest.php index 1df1fdc27d17..81c93ebd21cb 100644 --- a/apps/files_sharing/tests/Panels/Admin/SettingsPanelTest.php +++ b/apps/files_sharing/tests/Panels/Admin/SettingsPanelTest.php @@ -31,7 +31,7 @@ class SettingsPanelTest extends \Test\TestCase { /** @var SettingsPanel | \PHPUnit\Framework\MockObject\MockObject */ private $settingsPanel; - protected function setUp() { + protected function setUp(): void { $this->sharingBlacklist = $this->getMockBuilder(SharingBlacklist::class) ->disableOriginalConstructor() ->getMock(); diff --git a/apps/files_sharing/tests/Panels/Personal/PersonalPanelTest.php b/apps/files_sharing/tests/Panels/Personal/PersonalPanelTest.php index 01a510df39f5..b779a82d15ca 100644 --- a/apps/files_sharing/tests/Panels/Personal/PersonalPanelTest.php +++ b/apps/files_sharing/tests/Panels/Personal/PersonalPanelTest.php @@ -36,7 +36,7 @@ class PersonalPanelTest extends \Test\TestCase { /** @var PersonalPanel $personalPanel */ private $personalPanel; - protected function setUp() { + protected function setUp(): void { $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); diff --git a/apps/files_sharing/tests/Panels/Personal/SectionTest.php b/apps/files_sharing/tests/Panels/Personal/SectionTest.php index 7b5fe76d4e1a..5ec92ac7407b 100644 --- a/apps/files_sharing/tests/Panels/Personal/SectionTest.php +++ b/apps/files_sharing/tests/Panels/Personal/SectionTest.php @@ -31,7 +31,7 @@ class SectionTest extends \Test\TestCase { /** @var Section $section */ private $section; - protected function setUp() { + protected function setUp(): void { $this->l = $this->getMockBuilder(IL10N::class) ->disableOriginalConstructor() ->getMock(); diff --git a/apps/files_sharing/tests/PermissionsTest.php b/apps/files_sharing/tests/PermissionsTest.php index 6033133c6bbc..5e65522706e4 100644 --- a/apps/files_sharing/tests/PermissionsTest.php +++ b/apps/files_sharing/tests/PermissionsTest.php @@ -58,7 +58,7 @@ class PermissionsTest extends TestCase { /** @var Cache */ private $ownerCache; - protected function setUp() { + protected function setUp(): void { parent::setUp(); self::loginHelper(self::TEST_FILES_SHARING_API_USER1); @@ -109,7 +109,7 @@ protected function setUp() { $this->sharedCacheRestrictedShare = $this->sharedStorageRestrictedShare->getCache(); } - protected function tearDown() { + protected function tearDown(): void { if ($this->sharedCache) { $this->sharedCache->clear(); } diff --git a/apps/files_sharing/tests/PropagationTestCase.php b/apps/files_sharing/tests/PropagationTestCase.php index b6bf6f966096..6d16de929500 100644 --- a/apps/files_sharing/tests/PropagationTestCase.php +++ b/apps/files_sharing/tests/PropagationTestCase.php @@ -35,12 +35,12 @@ public static function setUpBeforeClass() { \OCA\Files_Sharing\Helper::registerHooks(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->setUpShares(); } - protected function tearDown() { + protected function tearDown(): void { \OC_Hook::clear('OC_Filesystem', 'post_write'); \OC_Hook::clear('OC_Filesystem', 'post_delete'); \OC_Hook::clear('OC_Filesystem', 'post_rename'); diff --git a/apps/files_sharing/tests/Service/NotificationPublisherTest.php b/apps/files_sharing/tests/Service/NotificationPublisherTest.php index e6c38f9db9df..e8a63d578a00 100644 --- a/apps/files_sharing/tests/Service/NotificationPublisherTest.php +++ b/apps/files_sharing/tests/Service/NotificationPublisherTest.php @@ -51,7 +51,7 @@ class NotificationPublisherTest extends TestCase { /** @var NotificationPublisher */ private $publisher; - protected function setUp() { + protected function setUp(): void { $this->groupManager = $this->createMock('OCP\IGroupManager'); $this->userManager = $this->createMock('OCP\IUserManager'); $this->notificationManager = $this->createMock(\OCP\Notification\IManager::class); @@ -79,7 +79,7 @@ protected function setUp() { ->will($this->returnArgument(0)); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); } diff --git a/apps/files_sharing/tests/ShareTest.php b/apps/files_sharing/tests/ShareTest.php index 2b83afcc2b42..2d4eef1dcad2 100644 --- a/apps/files_sharing/tests/ShareTest.php +++ b/apps/files_sharing/tests/ShareTest.php @@ -36,7 +36,7 @@ class ShareTest extends TestCase { private static $tempStorage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->folder = self::TEST_FOLDER_NAME; @@ -54,7 +54,7 @@ protected function setUp() { $this->view->file_put_contents($this->folder . $this->subfolder . $this->filename, $this->data); } - protected function tearDown() { + protected function tearDown(): void { self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $this->view->unlink($this->filename); $this->view->deleteAll($this->folder); diff --git a/apps/files_sharing/tests/SharedMountTest.php b/apps/files_sharing/tests/SharedMountTest.php index 6ff9856cc494..72b4e9edae02 100644 --- a/apps/files_sharing/tests/SharedMountTest.php +++ b/apps/files_sharing/tests/SharedMountTest.php @@ -35,7 +35,7 @@ * @group DB */ class SharedMountTest extends TestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->folder = '/folder_share_storage_test'; @@ -49,7 +49,7 @@ protected function setUp() { $this->view->file_put_contents($this->folder . $this->filename, "file in subfolder"); } - protected function tearDown() { + protected function tearDown(): void { if ($this->view) { if ($this->view->file_exists($this->folder)) { $this->view->unlink($this->folder); diff --git a/apps/files_sharing/tests/SharedStorageTest.php b/apps/files_sharing/tests/SharedStorageTest.php index 513fa61957d4..e39f4a45fc3f 100644 --- a/apps/files_sharing/tests/SharedStorageTest.php +++ b/apps/files_sharing/tests/SharedStorageTest.php @@ -39,7 +39,7 @@ * @group DB */ class SharedStorageTest extends TestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OCA\Files_Trashbin\Trashbin::registerHooks(); $this->folder = '/folder_share_storage_test'; @@ -53,7 +53,7 @@ protected function setUp() { $this->view->file_put_contents($this->folder . $this->filename, "file in subfolder"); } - protected function tearDown() { + protected function tearDown(): void { if ($this->view) { if ($this->view->file_exists($this->folder)) { $this->view->unlink($this->folder); diff --git a/apps/files_sharing/tests/SharingBlacklistTest.php b/apps/files_sharing/tests/SharingBlacklistTest.php index d22b950ccf6f..dc0515d04a0f 100644 --- a/apps/files_sharing/tests/SharingBlacklistTest.php +++ b/apps/files_sharing/tests/SharingBlacklistTest.php @@ -32,7 +32,7 @@ class SharingBlacklistTest extends \Test\TestCase { /** @var SharingBlacklist | \PHPUnit\Framework\MockObject\MockObject */ private $sharingBlacklist; - public function setUp() { + public function setUp(): void { $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() ->getMock(); diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php index 6632407cf123..d95834d4c6f0 100644 --- a/apps/files_sharing/tests/TestCase.php +++ b/apps/files_sharing/tests/TestCase.php @@ -89,7 +89,7 @@ public static function setUpBeforeClass() { \OC::registerShareHooks(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); // create users @@ -124,14 +124,14 @@ protected function setUp() { $this->rootFolder = \OC::$server->getRootFolder(); } - protected function tearDown() { + protected function tearDown(): void { $query = \OCP\DB::prepare('DELETE FROM `*PREFIX*share`'); $query->execute(); parent::tearDown(); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { // delete group $group = \OC::$server->getGroupManager()->get(self::TEST_FILES_SHARING_API_GROUP1); if ($group !== null) { diff --git a/apps/files_sharing/tests/UnshareChildrenTest.php b/apps/files_sharing/tests/UnshareChildrenTest.php index 4bb6cfef94c0..afe6779a1dcf 100644 --- a/apps/files_sharing/tests/UnshareChildrenTest.php +++ b/apps/files_sharing/tests/UnshareChildrenTest.php @@ -40,7 +40,7 @@ class UnshareChildrenTest extends TestCase { private static $tempStorage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OCP\Util::connectHook('OC_Filesystem', 'post_delete', '\OCA\Files_Sharing\Hooks', 'unshareChildren'); @@ -59,7 +59,7 @@ protected function setUp() { $this->view->file_put_contents($this->folder . $this->subfolder . $this->filename, $this->data); } - protected function tearDown() { + protected function tearDown(): void { if ($this->view) { $this->view->deleteAll($this->folder); } diff --git a/apps/files_sharing/tests/UpdaterTest.php b/apps/files_sharing/tests/UpdaterTest.php index 12eb8af0369c..fcade7cb87f0 100644 --- a/apps/files_sharing/tests/UpdaterTest.php +++ b/apps/files_sharing/tests/UpdaterTest.php @@ -42,7 +42,7 @@ public static function setUpBeforeClass() { \OCA\Files_Sharing\Helper::registerHooks(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->folder = self::TEST_FOLDER_NAME; @@ -55,7 +55,7 @@ protected function setUp() { $this->view->file_put_contents($this->folder . '/' . $this->filename, $this->data); } - protected function tearDown() { + protected function tearDown(): void { if ($this->view) { $this->view->unlink($this->filename); $this->view->deleteAll($this->folder); diff --git a/apps/files_sharing/tests/WatcherTest.php b/apps/files_sharing/tests/WatcherTest.php index e700cabf04e0..6e745d529db4 100644 --- a/apps/files_sharing/tests/WatcherTest.php +++ b/apps/files_sharing/tests/WatcherTest.php @@ -50,7 +50,7 @@ class WatcherTest extends TestCase { /** @var \OCP\Share\IShare */ private $_share; - protected function setUp() { + protected function setUp(): void { parent::setUp(); self::loginHelper(self::TEST_FILES_SHARING_API_USER1); @@ -82,7 +82,7 @@ protected function setUp() { $this->sharedCache = $this->sharedStorage->getCache(); } - protected function tearDown() { + protected function tearDown(): void { if ($this->sharedCache) { $this->sharedCache->clear(); } diff --git a/apps/files_trashbin/tests/Command/CleanUpTest.php b/apps/files_trashbin/tests/Command/CleanUpTest.php index a270e5300d73..6ff10481d5d7 100644 --- a/apps/files_trashbin/tests/Command/CleanUpTest.php +++ b/apps/files_trashbin/tests/Command/CleanUpTest.php @@ -55,7 +55,7 @@ class CleanUpTest extends TestCase { /** @var string */ protected $user0 = 'user0'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = $this->getMockBuilder('OCP\Files\IRootFolder') ->disableOriginalConstructor()->getMock(); diff --git a/apps/files_trashbin/tests/Command/ExpireTrashTest.php b/apps/files_trashbin/tests/Command/ExpireTrashTest.php index b6f781248823..9cd872e766d8 100644 --- a/apps/files_trashbin/tests/Command/ExpireTrashTest.php +++ b/apps/files_trashbin/tests/Command/ExpireTrashTest.php @@ -43,7 +43,7 @@ class ExpireTrashTest extends TestCase { private $expiration; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/apps/files_trashbin/tests/QuotaTest.php b/apps/files_trashbin/tests/QuotaTest.php index 29a225fabfd5..571e313d581a 100644 --- a/apps/files_trashbin/tests/QuotaTest.php +++ b/apps/files_trashbin/tests/QuotaTest.php @@ -31,7 +31,7 @@ class QuotaTest extends \Test\TestCase { /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */ protected $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->getMockBuilder(IUserManager::class) diff --git a/apps/files_trashbin/tests/StorageTest.php b/apps/files_trashbin/tests/StorageTest.php index 8f839e9eacd1..ea8faf331e4e 100644 --- a/apps/files_trashbin/tests/StorageTest.php +++ b/apps/files_trashbin/tests/StorageTest.php @@ -61,7 +61,7 @@ class StorageTest extends TestCase { */ private $userView; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_Hook::clear(); @@ -87,7 +87,7 @@ protected function setUp() { $this->userView->file_put_contents('folder/inside.txt', 'bar'); } - protected function tearDown() { + protected function tearDown(): void { \OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin'); $this->logout(); \OC_Hook::clear(); diff --git a/apps/files_trashbin/tests/TrashbinTest.php b/apps/files_trashbin/tests/TrashbinTest.php index 0455b7ea98ab..cd55f758417b 100644 --- a/apps/files_trashbin/tests/TrashbinTest.php +++ b/apps/files_trashbin/tests/TrashbinTest.php @@ -97,7 +97,7 @@ public static function setUpBeforeClass() { self::loginHelper(self::TEST_TRASHBIN_USER1, true); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { // cleanup test user $user = \OC::$server->getUserManager()->get(self::TEST_TRASHBIN_USER1); if ($user !== null) { @@ -121,7 +121,7 @@ public static function tearDownAfterClass() { parent::tearDownAfterClass(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC::$server->getAppManager()->enableApp('files_trashbin'); @@ -144,7 +144,7 @@ protected function setUp() { self::loginHelper(self::TEST_TRASHBIN_USER1); } - protected function tearDown() { + protected function tearDown(): void { $this->restoreService('AllConfig'); // disable trashbin to be able to properly clean up \OC::$server->getAppManager()->disableApp('files_trashbin'); diff --git a/apps/files_versions/tests/Command/CleanupTest.php b/apps/files_versions/tests/Command/CleanupTest.php index 6ffb300de449..6f96ce8782b2 100644 --- a/apps/files_versions/tests/Command/CleanupTest.php +++ b/apps/files_versions/tests/Command/CleanupTest.php @@ -45,7 +45,7 @@ class CleanupTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject | IRootFolder */ protected $rootFolder; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->rootFolder = $this->getMockBuilder('OCP\Files\IRootFolder') diff --git a/apps/files_versions/tests/Command/ExpireVersionsTest.php b/apps/files_versions/tests/Command/ExpireVersionsTest.php index e9e3634b77a3..54a52e33f07b 100644 --- a/apps/files_versions/tests/Command/ExpireVersionsTest.php +++ b/apps/files_versions/tests/Command/ExpireVersionsTest.php @@ -43,7 +43,7 @@ class ExpireVersionsTest extends TestCase { private $expiration; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php index 2cf21942eb46..03414648db2c 100644 --- a/apps/files_versions/tests/VersioningTest.php +++ b/apps/files_versions/tests/VersioningTest.php @@ -68,7 +68,7 @@ public static function setUpBeforeClass() { $application->registerMountProviders(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = \OC::$server->getConfig(); @@ -108,7 +108,7 @@ protected function setUp() { } } - protected function tearDown() { + protected function tearDown(): void { $this->restoreService('AllConfig'); if ($this->rootView) { diff --git a/apps/provisioning_api/tests/AppsTest.php b/apps/provisioning_api/tests/AppsTest.php index 00eda3f95c65..1a01a7303cc0 100644 --- a/apps/provisioning_api/tests/AppsTest.php +++ b/apps/provisioning_api/tests/AppsTest.php @@ -45,7 +45,7 @@ class AppsTest extends TestCase { /** @var IUserSession */ private $userSession; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appManager = \OC::$server->getAppManager(); diff --git a/apps/provisioning_api/tests/GroupsTest.php b/apps/provisioning_api/tests/GroupsTest.php index 4d9bfeea2008..b007f5052899 100644 --- a/apps/provisioning_api/tests/GroupsTest.php +++ b/apps/provisioning_api/tests/GroupsTest.php @@ -45,7 +45,7 @@ class GroupsTest extends \Test\TestCase { /** @var Groups */ protected $api; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->subAdminManager = $this->getMockBuilder('OC\SubAdmin') diff --git a/apps/provisioning_api/tests/TestCase.php b/apps/provisioning_api/tests/TestCase.php index 4a60bde4aef1..4d1ade402b1a 100644 --- a/apps/provisioning_api/tests/TestCase.php +++ b/apps/provisioning_api/tests/TestCase.php @@ -39,7 +39,7 @@ abstract class TestCase extends \Test\TestCase { /** @var IGroupManager */ protected $groupManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = \OC::$server->getUserManager(); @@ -62,7 +62,7 @@ protected function generateUsers($num = 1) { return \count($users) == 1 ? \reset($users) : $users; } - protected function tearDown() { + protected function tearDown(): void { foreach ($this->users as $user) { $user->delete(); } diff --git a/apps/provisioning_api/tests/UsersTest.php b/apps/provisioning_api/tests/UsersTest.php index 0c1b7503faf3..d4eb95e4da5d 100644 --- a/apps/provisioning_api/tests/UsersTest.php +++ b/apps/provisioning_api/tests/UsersTest.php @@ -57,13 +57,13 @@ class UsersTest extends OriginalTest { /** @var \OC\Authentication\TwoFactorAuth\Manager | PHPUnit\Framework\MockObject\MockObject */ private $twoFactorAuthManager; - protected function tearDown() { + protected function tearDown(): void { $_GET = null; $_POST = null; parent::tearDown(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/apps/systemtags/tests/unit/activity/ExtensionTest.php b/apps/systemtags/tests/unit/activity/ExtensionTest.php index 62b1d30fd663..e9f2dceb3467 100644 --- a/apps/systemtags/tests/unit/activity/ExtensionTest.php +++ b/apps/systemtags/tests/unit/activity/ExtensionTest.php @@ -42,7 +42,7 @@ class ExtensionTest extends TestCase { /** @var Extension */ private $extension; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->languageFactory = $this->createMock(IFactory::class); diff --git a/apps/systemtags/tests/unit/activity/ListenerTest.php b/apps/systemtags/tests/unit/activity/ListenerTest.php index 1ecc2df62897..c6fe0901927b 100644 --- a/apps/systemtags/tests/unit/activity/ListenerTest.php +++ b/apps/systemtags/tests/unit/activity/ListenerTest.php @@ -83,7 +83,7 @@ class ActivityListenerTest extends \Test\TestCase { */ private $activityManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->groupManager = $this->createMock(IGroupManager::class); diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php index 7272044ae392..6b968f77453b 100644 --- a/apps/updatenotification/tests/Controller/AdminControllerTest.php +++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php @@ -58,7 +58,7 @@ class AdminControllerTest extends TestCase { /** @var IDateTimeFormatter */ private $dateTimeFormatter; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock('\\OCP\\IRequest'); diff --git a/apps/updatenotification/tests/Notification/BackgroundJobTest.php b/apps/updatenotification/tests/Notification/BackgroundJobTest.php index f96df597a20d..8e5676f8ecd9 100644 --- a/apps/updatenotification/tests/Notification/BackgroundJobTest.php +++ b/apps/updatenotification/tests/Notification/BackgroundJobTest.php @@ -47,7 +47,7 @@ class BackgroundJobTest extends TestCase { /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ protected $urlGenerator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock('OCP\IConfig'); diff --git a/apps/updatenotification/tests/Notification/NotifierTest.php b/apps/updatenotification/tests/Notification/NotifierTest.php index 15332a0f3755..288dfd19cbe1 100644 --- a/apps/updatenotification/tests/Notification/NotifierTest.php +++ b/apps/updatenotification/tests/Notification/NotifierTest.php @@ -34,7 +34,7 @@ class NotifierTest extends TestCase { /** @var IFactory|\PHPUnit\Framework\MockObject\MockObject */ protected $l10nFactory; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->notificationManager = $this->createMock('OCP\Notification\IManager'); diff --git a/apps/updatenotification/tests/ResetTokenBackgroundJobTest.php b/apps/updatenotification/tests/ResetTokenBackgroundJobTest.php index a3059047b193..efe81a653b25 100644 --- a/apps/updatenotification/tests/ResetTokenBackgroundJobTest.php +++ b/apps/updatenotification/tests/ResetTokenBackgroundJobTest.php @@ -35,7 +35,7 @@ class ResetTokenBackgroundJobTest extends TestCase { /** @var ITimeFactory */ private $timeFactory; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock('\\OCP\\IConfig'); $this->timeFactory = $this->createMock('\\OCP\\AppFramework\\Utility\\ITimeFactory'); diff --git a/apps/updatenotification/tests/UpdateCheckerTest.php b/apps/updatenotification/tests/UpdateCheckerTest.php index d80160c3b0c8..1c8eb68ea003 100644 --- a/apps/updatenotification/tests/UpdateCheckerTest.php +++ b/apps/updatenotification/tests/UpdateCheckerTest.php @@ -32,7 +32,7 @@ class UpdateCheckerTest extends TestCase { /** @var UpdateChecker */ private $updateChecker; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->updater = $this->getMockBuilder('\OC\Updater\VersionCheck') diff --git a/tests/Core/Command/Apps/AppsDisableTest.php b/tests/Core/Command/Apps/AppsDisableTest.php index 6c0d2f3e2d01..6fd4a66505fb 100644 --- a/tests/Core/Command/Apps/AppsDisableTest.php +++ b/tests/Core/Command/Apps/AppsDisableTest.php @@ -35,7 +35,7 @@ class AppsDisableTest extends TestCase { /** @var CommandTester */ private $commandTester; - public function setUp() { + public function setUp(): void { parent::setUp(); $command = new Disable(\OC::$server->getAppManager()); diff --git a/tests/Core/Command/Apps/AppsEnableTest.php b/tests/Core/Command/Apps/AppsEnableTest.php index 59bfdc700f2b..3c6b6d41920b 100644 --- a/tests/Core/Command/Apps/AppsEnableTest.php +++ b/tests/Core/Command/Apps/AppsEnableTest.php @@ -35,7 +35,7 @@ class AppsEnableTest extends TestCase { /** @var CommandTester */ private $commandTester; - public function setUp() { + public function setUp(): void { parent::setUp(); $command = new Enable(\OC::$server->getAppManager()); diff --git a/tests/Core/Command/Apps/AppsGetPathTest.php b/tests/Core/Command/Apps/AppsGetPathTest.php index fe2020afe412..852337e3f38c 100644 --- a/tests/Core/Command/Apps/AppsGetPathTest.php +++ b/tests/Core/Command/Apps/AppsGetPathTest.php @@ -35,7 +35,7 @@ class AppsGetPathTest extends TestCase { /** @var CommandTester */ private $commandTester; - public function setUp() { + public function setUp(): void { parent::setUp(); $command = new GetPath(); diff --git a/tests/Core/Command/Apps/AppsListTest.php b/tests/Core/Command/Apps/AppsListTest.php index 63d3a6e0e2d8..ec730ffa3f80 100644 --- a/tests/Core/Command/Apps/AppsListTest.php +++ b/tests/Core/Command/Apps/AppsListTest.php @@ -35,7 +35,7 @@ class AppsListTest extends TestCase { /** @var CommandTester */ private $commandTester; - public function setUp() { + public function setUp(): void { parent::setUp(); $command = new ListApps(\OC::$server->getAppManager()); diff --git a/tests/Core/Command/Background/Queue/DeleteTest.php b/tests/Core/Command/Background/Queue/DeleteTest.php index fabd3a3b38a4..895e36edd638 100644 --- a/tests/Core/Command/Background/Queue/DeleteTest.php +++ b/tests/Core/Command/Background/Queue/DeleteTest.php @@ -38,7 +38,7 @@ class DeleteTest extends TestCase { /** @var IJobList */ private $jobList; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->jobList = $this->createMock(IJobList::class); diff --git a/tests/Core/Command/Background/Queue/ExecuteTest.php b/tests/Core/Command/Background/Queue/ExecuteTest.php index cafd2c7777b4..3981de03ee1c 100644 --- a/tests/Core/Command/Background/Queue/ExecuteTest.php +++ b/tests/Core/Command/Background/Queue/ExecuteTest.php @@ -45,7 +45,7 @@ class ExecuteTest extends TestCase { /** @var IJob[] */ private $jobById = []; - public function setUp() { + public function setUp(): void { parent::setUp(); $normalJob = $this->createMock(IJob::class); diff --git a/tests/Core/Command/Background/Queue/StatusTest.php b/tests/Core/Command/Background/Queue/StatusTest.php index 61a2c5dad5bf..e86af81e21bb 100644 --- a/tests/Core/Command/Background/Queue/StatusTest.php +++ b/tests/Core/Command/Background/Queue/StatusTest.php @@ -40,7 +40,7 @@ class StatusTest extends TestCase { /** @var IJobList */ private $jobList; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->jobList = $this->createMock(IJobList::class); diff --git a/tests/Core/Command/Config/App/DeleteConfigTest.php b/tests/Core/Command/Config/App/DeleteConfigTest.php index c1e59d45302c..9986e9989e37 100644 --- a/tests/Core/Command/Config/App/DeleteConfigTest.php +++ b/tests/Core/Command/Config/App/DeleteConfigTest.php @@ -36,7 +36,7 @@ class DeleteConfigTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder('OCP\IConfig') diff --git a/tests/Core/Command/Config/App/GetConfigTest.php b/tests/Core/Command/Config/App/GetConfigTest.php index f0b31fa7c6ad..a46fd1966f70 100644 --- a/tests/Core/Command/Config/App/GetConfigTest.php +++ b/tests/Core/Command/Config/App/GetConfigTest.php @@ -38,7 +38,7 @@ class GetConfigTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/Core/Command/Config/App/SetConfigTest.php b/tests/Core/Command/Config/App/SetConfigTest.php index a84edf1f3df4..b2ee0694293a 100644 --- a/tests/Core/Command/Config/App/SetConfigTest.php +++ b/tests/Core/Command/Config/App/SetConfigTest.php @@ -36,7 +36,7 @@ class SetConfigTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder('OCP\IConfig') diff --git a/tests/Core/Command/Config/ImportTest.php b/tests/Core/Command/Config/ImportTest.php index b5cbbada0ba2..eaf1f8dc88c7 100644 --- a/tests/Core/Command/Config/ImportTest.php +++ b/tests/Core/Command/Config/ImportTest.php @@ -36,7 +36,7 @@ class ImportTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder('OCP\IConfig') diff --git a/tests/Core/Command/Config/ListConfigsTest.php b/tests/Core/Command/Config/ListConfigsTest.php index 954675875c58..f68abd9f2248 100644 --- a/tests/Core/Command/Config/ListConfigsTest.php +++ b/tests/Core/Command/Config/ListConfigsTest.php @@ -39,7 +39,7 @@ class ListConfigsTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $systemConfig = $this->systemConfig = $this->getMockBuilder('OC\SystemConfig') diff --git a/tests/Core/Command/Config/System/DeleteConfigTest.php b/tests/Core/Command/Config/System/DeleteConfigTest.php index eebbf139c5e3..6d159ef45c4a 100644 --- a/tests/Core/Command/Config/System/DeleteConfigTest.php +++ b/tests/Core/Command/Config/System/DeleteConfigTest.php @@ -36,7 +36,7 @@ class DeleteConfigTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $systemConfig = $this->systemConfig = $this->getMockBuilder('OC\SystemConfig') diff --git a/tests/Core/Command/Config/System/GetConfigTest.php b/tests/Core/Command/Config/System/GetConfigTest.php index 191de04d7705..514479ee5f13 100644 --- a/tests/Core/Command/Config/System/GetConfigTest.php +++ b/tests/Core/Command/Config/System/GetConfigTest.php @@ -37,7 +37,7 @@ class GetConfigTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $systemConfig = $this->systemConfig = $this->getMockBuilder(SystemConfig::class) diff --git a/tests/Core/Command/Config/System/SetConfigTest.php b/tests/Core/Command/Config/System/SetConfigTest.php index b87dfb313f2e..7a8f24ca899c 100644 --- a/tests/Core/Command/Config/System/SetConfigTest.php +++ b/tests/Core/Command/Config/System/SetConfigTest.php @@ -36,7 +36,7 @@ class SetConfigTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $systemConfig = $this->systemConfig = $this->getMockBuilder('OC\SystemConfig') diff --git a/tests/Core/Command/Db/ConvertTypeTest.php b/tests/Core/Command/Db/ConvertTypeTest.php index 6dbae8931793..8a22e09b8933 100644 --- a/tests/Core/Command/Db/ConvertTypeTest.php +++ b/tests/Core/Command/Db/ConvertTypeTest.php @@ -50,7 +50,7 @@ class ConvertTypeTest extends TestCase { /** @var \Doctrine\DBAL\Connection */ private $connection; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php index 225cdb801706..98a70980a828 100644 --- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php +++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php @@ -60,7 +60,7 @@ class ChangeKeyStorageRootTest extends TestCase { /** @var \OCP\UserInterface | \PHPUnit\Framework\MockObject\MockObject */ protected $userInterface; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->view = $this->createMock('\OC\Files\View'); diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php index 09e8de1c9173..97f0e89ed8bf 100644 --- a/tests/Core/Command/Encryption/DecryptAllTest.php +++ b/tests/Core/Command/Encryption/DecryptAllTest.php @@ -47,7 +47,7 @@ class DecryptAllTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Encryption\DecryptAll */ protected $decryptAll; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder('OCP\IConfig') diff --git a/tests/Core/Command/Encryption/DisableTest.php b/tests/Core/Command/Encryption/DisableTest.php index fd5bbfb7e4c6..74a42767c6d0 100644 --- a/tests/Core/Command/Encryption/DisableTest.php +++ b/tests/Core/Command/Encryption/DisableTest.php @@ -35,7 +35,7 @@ class DisableTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder('OCP\IConfig') diff --git a/tests/Core/Command/Encryption/EnableTest.php b/tests/Core/Command/Encryption/EnableTest.php index 607f51bf33ce..b8a548515d51 100644 --- a/tests/Core/Command/Encryption/EnableTest.php +++ b/tests/Core/Command/Encryption/EnableTest.php @@ -37,7 +37,7 @@ class EnableTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder('OCP\IConfig') diff --git a/tests/Core/Command/Encryption/EncryptAllTest.php b/tests/Core/Command/Encryption/EncryptAllTest.php index 5a58c390127a..b984027e003e 100644 --- a/tests/Core/Command/Encryption/EncryptAllTest.php +++ b/tests/Core/Command/Encryption/EncryptAllTest.php @@ -50,7 +50,7 @@ class EncryptAllTest extends TestCase { /** @var EncryptAll */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder('OCP\IConfig') diff --git a/tests/Core/Command/Encryption/SetDefaultModuleTest.php b/tests/Core/Command/Encryption/SetDefaultModuleTest.php index f1cebf495d75..68cb47f6b449 100644 --- a/tests/Core/Command/Encryption/SetDefaultModuleTest.php +++ b/tests/Core/Command/Encryption/SetDefaultModuleTest.php @@ -35,7 +35,7 @@ class SetDefaultModuleTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $manager = $this->manager = $this->getMockBuilder('OCP\Encryption\IManager') diff --git a/tests/Core/Command/Group/AddMemberTest.php b/tests/Core/Command/Group/AddMemberTest.php index e3b92494e504..68c54133413f 100644 --- a/tests/Core/Command/Group/AddMemberTest.php +++ b/tests/Core/Command/Group/AddMemberTest.php @@ -37,7 +37,7 @@ class AddMemberTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $command = new AddMember(\OC::$server->getGroupManager(), \OC::$server->getUserManager()); diff --git a/tests/Core/Command/Group/AddTest.php b/tests/Core/Command/Group/AddTest.php index ee2c18d33f2e..5ff614ad26bc 100644 --- a/tests/Core/Command/Group/AddTest.php +++ b/tests/Core/Command/Group/AddTest.php @@ -34,7 +34,7 @@ class AddTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $command = new Add(\OC::$server->getGroupManager()); diff --git a/tests/Core/Command/Group/DeleteTest.php b/tests/Core/Command/Group/DeleteTest.php index 021642420e7c..e22cfc0455b9 100644 --- a/tests/Core/Command/Group/DeleteTest.php +++ b/tests/Core/Command/Group/DeleteTest.php @@ -35,7 +35,7 @@ class DeleteTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $groupManager = $this->groupManager = $this->getMockBuilder('OCP\IGroupManager') diff --git a/tests/Core/Command/Group/ListGroupMembersTest.php b/tests/Core/Command/Group/ListGroupMembersTest.php index 8e9ac9a46067..aced8bc01a18 100644 --- a/tests/Core/Command/Group/ListGroupMembersTest.php +++ b/tests/Core/Command/Group/ListGroupMembersTest.php @@ -37,7 +37,7 @@ class ListGroupMembersTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $command = new ListGroupMembers(\OC::$server->getGroupManager()); diff --git a/tests/Core/Command/Group/ListGroupsTest.php b/tests/Core/Command/Group/ListGroupsTest.php index 6c9c75a510b4..f888bc466b26 100644 --- a/tests/Core/Command/Group/ListGroupsTest.php +++ b/tests/Core/Command/Group/ListGroupsTest.php @@ -34,7 +34,7 @@ class ListGroupsTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $command = new ListGroups(\OC::$server->getGroupManager()); diff --git a/tests/Core/Command/Group/RemoveMemberTest.php b/tests/Core/Command/Group/RemoveMemberTest.php index 57a519f5700c..882b2d0d3be3 100644 --- a/tests/Core/Command/Group/RemoveMemberTest.php +++ b/tests/Core/Command/Group/RemoveMemberTest.php @@ -37,7 +37,7 @@ class RemoveMemberTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $command = new RemoveMember(\OC::$server->getGroupManager(), \OC::$server->getUserManager()); diff --git a/tests/Core/Command/Log/ManageTest.php b/tests/Core/Command/Log/ManageTest.php index 5259a57eac58..bed6a5e47d11 100644 --- a/tests/Core/Command/Log/ManageTest.php +++ b/tests/Core/Command/Log/ManageTest.php @@ -35,7 +35,7 @@ class ManageTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder('OCP\IConfig') diff --git a/tests/Core/Command/Log/OwnCloudTest.php b/tests/Core/Command/Log/OwnCloudTest.php index 5c5ae8b56aac..11713ff51c38 100644 --- a/tests/Core/Command/Log/OwnCloudTest.php +++ b/tests/Core/Command/Log/OwnCloudTest.php @@ -35,7 +35,7 @@ class OwnCloudTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder('OCP\IConfig') diff --git a/tests/Core/Command/Maintenance/DataFingerprintTest.php b/tests/Core/Command/Maintenance/DataFingerprintTest.php index 29777cb9e1c1..dda2cd2af933 100644 --- a/tests/Core/Command/Maintenance/DataFingerprintTest.php +++ b/tests/Core/Command/Maintenance/DataFingerprintTest.php @@ -49,7 +49,7 @@ public function providesAnswers() { ]; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php index bcb527eaf540..621e2624f8ac 100644 --- a/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php +++ b/tests/Core/Command/Maintenance/Mimetype/UpdateDBTest.php @@ -40,7 +40,7 @@ class UpdateDBTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->detector = $this->getMockBuilder('OC\Files\Type\Detection') diff --git a/tests/Core/Command/Maintenance/RepairTest.php b/tests/Core/Command/Maintenance/RepairTest.php index 37b318f61eb8..607c15d7953e 100644 --- a/tests/Core/Command/Maintenance/RepairTest.php +++ b/tests/Core/Command/Maintenance/RepairTest.php @@ -36,7 +36,7 @@ class RepairTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $application = new Application( @@ -54,7 +54,7 @@ protected function setUp() { $this->commandTester = new CommandTester($command); } - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); \OC::$server->getConfig()->setSystemValue('maintenance', false); } diff --git a/tests/Core/Command/Maintenance/SingleUserTest.php b/tests/Core/Command/Maintenance/SingleUserTest.php index fb8efaf0a579..194fa44eedfc 100644 --- a/tests/Core/Command/Maintenance/SingleUserTest.php +++ b/tests/Core/Command/Maintenance/SingleUserTest.php @@ -35,7 +35,7 @@ class SingleUserTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->config = $this->getMockBuilder('OCP\IConfig') diff --git a/tests/Core/Command/System/CronTest.php b/tests/Core/Command/System/CronTest.php index 81c5a51b5ecf..e2b89cb55086 100644 --- a/tests/Core/Command/System/CronTest.php +++ b/tests/Core/Command/System/CronTest.php @@ -51,7 +51,7 @@ class CronTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/Core/Command/TwoFactorAuth/DisableTest.php b/tests/Core/Command/TwoFactorAuth/DisableTest.php index 75ed6a13a20d..a1b4fc87d815 100644 --- a/tests/Core/Command/TwoFactorAuth/DisableTest.php +++ b/tests/Core/Command/TwoFactorAuth/DisableTest.php @@ -37,7 +37,7 @@ class DisableTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $command = new Disable(\OC::$server->getTwoFactorAuthManager(), \OC::$server->getUserManager()); diff --git a/tests/Core/Command/TwoFactorAuth/EnableTest.php b/tests/Core/Command/TwoFactorAuth/EnableTest.php index 041e8af8ee08..c0ae7bdd6f16 100644 --- a/tests/Core/Command/TwoFactorAuth/EnableTest.php +++ b/tests/Core/Command/TwoFactorAuth/EnableTest.php @@ -37,7 +37,7 @@ class EnableTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $command = new Enable(\OC::$server->getTwoFactorAuthManager(), \OC::$server->getUserManager()); diff --git a/tests/Core/Command/User/AddTest.php b/tests/Core/Command/User/AddTest.php index 5f09ee5339b5..0ae99e3cec1b 100644 --- a/tests/Core/Command/User/AddTest.php +++ b/tests/Core/Command/User/AddTest.php @@ -39,7 +39,7 @@ class AddTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $application = new Application(\OC::$server->getConfig(), \OC::$server->getEventDispatcher(), \OC::$server->getRequest()); @@ -49,7 +49,7 @@ protected function setUp() { $this->createUser('user1'); } - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); if (\OC::$server->getUserManager()->get('user2') instanceof User) { \OC::$server->getUserManager()->get('user2')->delete(); diff --git a/tests/Core/Command/User/DeleteTest.php b/tests/Core/Command/User/DeleteTest.php index ba2a27c67be1..b958c870ecd6 100644 --- a/tests/Core/Command/User/DeleteTest.php +++ b/tests/Core/Command/User/DeleteTest.php @@ -36,7 +36,7 @@ class DeleteTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->getMockBuilder('OCP\IUserManager') ->disableOriginalConstructor() diff --git a/tests/Core/Command/User/DisableTest.php b/tests/Core/Command/User/DisableTest.php index 9305f3577324..acf9b229b9a9 100644 --- a/tests/Core/Command/User/DisableTest.php +++ b/tests/Core/Command/User/DisableTest.php @@ -37,7 +37,7 @@ class DisableTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $command = new Disable(\OC::$server->getUserManager()); diff --git a/tests/Core/Command/User/EnableTest.php b/tests/Core/Command/User/EnableTest.php index 5adca7c6e786..23ab982b05f9 100644 --- a/tests/Core/Command/User/EnableTest.php +++ b/tests/Core/Command/User/EnableTest.php @@ -37,7 +37,7 @@ class EnableTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $command = new Enable(\OC::$server->getUserManager()); diff --git a/tests/Core/Command/User/InactiveTest.php b/tests/Core/Command/User/InactiveTest.php index 69854e023022..7d4bfcda58ab 100644 --- a/tests/Core/Command/User/InactiveTest.php +++ b/tests/Core/Command/User/InactiveTest.php @@ -39,7 +39,7 @@ class InactiveTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $userManager = $this->userManager = $this->getMockBuilder('OCP\IUserManager') diff --git a/tests/Core/Command/User/LastSeenTest.php b/tests/Core/Command/User/LastSeenTest.php index 02d6a7b6127a..af147435423d 100644 --- a/tests/Core/Command/User/LastSeenTest.php +++ b/tests/Core/Command/User/LastSeenTest.php @@ -35,7 +35,7 @@ class LastSeenTest extends TestCase { /** @var \Symfony\Component\Console\Command\Command */ protected $command; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $userManager = $this->userManager = $this->getMockBuilder('OCP\IUserManager') diff --git a/tests/Core/Command/User/ListUserGroupsTest.php b/tests/Core/Command/User/ListUserGroupsTest.php index f202c8652876..1c98ce453261 100644 --- a/tests/Core/Command/User/ListUserGroupsTest.php +++ b/tests/Core/Command/User/ListUserGroupsTest.php @@ -37,7 +37,7 @@ class ListUserGroupsTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $command = new ListUserGroups(\OC::$server->getUserManager(), \OC::$server->getGroupManager()); diff --git a/tests/Core/Command/User/ListUsersTest.php b/tests/Core/Command/User/ListUsersTest.php index d439d50e622d..cbb89a799334 100644 --- a/tests/Core/Command/User/ListUsersTest.php +++ b/tests/Core/Command/User/ListUsersTest.php @@ -34,7 +34,7 @@ class ListUsersTest extends TestCase { /** @var CommandTester */ private $commandTester; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC::$server->getUserManager()->createUser('testlistuser', 'password'); @@ -42,7 +42,7 @@ protected function setUp() { $this->commandTester = new CommandTester($command); } - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); \OC::$server->getUserManager()->get('testlistuser')->delete(); } diff --git a/tests/Core/Command/User/ModifyTest.php b/tests/Core/Command/User/ModifyTest.php index 15de3a072001..7d66115d7e91 100644 --- a/tests/Core/Command/User/ModifyTest.php +++ b/tests/Core/Command/User/ModifyTest.php @@ -50,7 +50,7 @@ class ModifyTest extends TestCase { /** @var OutputInterface | \PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/tests/Core/Command/User/ResetPasswordTest.php b/tests/Core/Command/User/ResetPasswordTest.php index 1814b05ed67b..e068b5d070d3 100644 --- a/tests/Core/Command/User/ResetPasswordTest.php +++ b/tests/Core/Command/User/ResetPasswordTest.php @@ -51,7 +51,7 @@ class ResetPasswordTest extends TestCase { private $lostController; /** @var ResetPassword */ private $resetPassword; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/tests/Core/Command/User/SettingTest.php b/tests/Core/Command/User/SettingTest.php index 84287731ffd4..ad4c872a6580 100644 --- a/tests/Core/Command/User/SettingTest.php +++ b/tests/Core/Command/User/SettingTest.php @@ -36,7 +36,7 @@ class SettingTest extends TestCase { /** @var \Symfony\Component\Console\Output\OutputInterface|\PHPUnit\Framework\MockObject\MockObject */ protected $consoleOutput; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userManager = $this->getMockBuilder('OCP\IUserManager') diff --git a/tests/Core/Controller/AvatarControllerTest.php b/tests/Core/Controller/AvatarControllerTest.php index b0e569d296e2..485147f85b29 100644 --- a/tests/Core/Controller/AvatarControllerTest.php +++ b/tests/Core/Controller/AvatarControllerTest.php @@ -74,7 +74,7 @@ class AvatarControllerTest extends TestCase { /** @var ILogger | \PHPUnit\Framework\MockObject\MockObject */ private $logger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->createUser('userid', 'pass'); $this->loginAsUser('userid'); @@ -125,7 +125,7 @@ protected function setUp() { $this->avatarFile->expects($this->any())->method('getEtag')->willReturn('my etag'); } - public function tearDown() { + public function tearDown(): void { $this->logout(); parent::tearDown(); } diff --git a/tests/Core/Controller/CronControllerTest.php b/tests/Core/Controller/CronControllerTest.php index 84099cb3e224..0924cc98f633 100644 --- a/tests/Core/Controller/CronControllerTest.php +++ b/tests/Core/Controller/CronControllerTest.php @@ -48,7 +48,7 @@ class CronControllerTest extends TestCase { /** @var IRequest | \PHPUnit_Framework_MockObject_MockObject */ private $request; - protected function setUp() { + protected function setUp(): void { $this->request = $this->createMock(IRequest::class); $this->config = $this->createMock(IConfig::class); $this->logger = $this->createMock(ILogger::class); diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index c45c1e95ea53..462aef91e246 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -53,7 +53,7 @@ class LoginControllerTest extends TestCase { /** @var Manager | \PHPUnit\Framework\MockObject\MockObject */ private $twoFactorManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); $this->userManager = $this->createMock(IUserManager::class); diff --git a/tests/Core/Controller/LostControllerTest.php b/tests/Core/Controller/LostControllerTest.php index d668592c67ee..4ccb0d05af71 100644 --- a/tests/Core/Controller/LostControllerTest.php +++ b/tests/Core/Controller/LostControllerTest.php @@ -71,7 +71,7 @@ class LostControllerTest extends TestCase { /** @var Session */ private $userSession; - protected function setUp() { + protected function setUp(): void { $this->existingUser = $this->getMockBuilder('OCP\IUser') ->disableOriginalConstructor()->getMock(); diff --git a/tests/Core/Controller/TokenControllerTest.php b/tests/Core/Controller/TokenControllerTest.php index 8a79225bec4a..945040aeb865 100644 --- a/tests/Core/Controller/TokenControllerTest.php +++ b/tests/Core/Controller/TokenControllerTest.php @@ -38,7 +38,7 @@ class TokenControllerTest extends TestCase { private $twoFactorAuthManager; private $secureRandom; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock('\OCP\IRequest'); diff --git a/tests/Core/Controller/TwoFactorChallengeControllerTest.php b/tests/Core/Controller/TwoFactorChallengeControllerTest.php index 4f0a4010960a..071a289e6306 100644 --- a/tests/Core/Controller/TwoFactorChallengeControllerTest.php +++ b/tests/Core/Controller/TwoFactorChallengeControllerTest.php @@ -52,7 +52,7 @@ class TwoFactorChallengeControllerTest extends TestCase { /** @var TwoFactorChallengeController|MockObject */ private $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/Core/Middleware/AccountModuleMiddlewareTest.php b/tests/Core/Middleware/AccountModuleMiddlewareTest.php index ef8cad4b31d1..348a048ca099 100644 --- a/tests/Core/Middleware/AccountModuleMiddlewareTest.php +++ b/tests/Core/Middleware/AccountModuleMiddlewareTest.php @@ -50,7 +50,7 @@ class AccountModuleMiddlewareTest extends TestCase { /** @var AccountModuleMiddleware */ private $middleware; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); diff --git a/tests/Core/Middleware/TwoFactorMiddlewareTest.php b/tests/Core/Middleware/TwoFactorMiddlewareTest.php index 366d94ce47f0..8a7b1bf2507c 100644 --- a/tests/Core/Middleware/TwoFactorMiddlewareTest.php +++ b/tests/Core/Middleware/TwoFactorMiddlewareTest.php @@ -53,7 +53,7 @@ class TwoFactorMiddlewareTest extends TestCase { /** @var TwoFactorMiddleware */ private $middleware; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->twoFactorManager = $this->getMockBuilder(Manager::class) diff --git a/tests/Settings/Controller/AppSettingsControllerTest.php b/tests/Settings/Controller/AppSettingsControllerTest.php index 254200242662..9beffa9f753f 100644 --- a/tests/Settings/Controller/AppSettingsControllerTest.php +++ b/tests/Settings/Controller/AppSettingsControllerTest.php @@ -45,7 +45,7 @@ class AppSettingsControllerTest extends TestCase { /** @var IAppManager */ private $appManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class) diff --git a/tests/Settings/Controller/AuthSettingsControllerTest.php b/tests/Settings/Controller/AuthSettingsControllerTest.php index 99cb8ec36a74..bb67f5752dbc 100644 --- a/tests/Settings/Controller/AuthSettingsControllerTest.php +++ b/tests/Settings/Controller/AuthSettingsControllerTest.php @@ -42,7 +42,7 @@ class AuthSettingsControllerTest extends TestCase { private $secureRandom; private $uid; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->createMock('\OCP\IRequest'); diff --git a/tests/Settings/Controller/CertificateControllerTest.php b/tests/Settings/Controller/CertificateControllerTest.php index b74802eb569b..49c7490f385a 100644 --- a/tests/Settings/Controller/CertificateControllerTest.php +++ b/tests/Settings/Controller/CertificateControllerTest.php @@ -48,7 +48,7 @@ class CertificateControllerTest extends \Test\TestCase { /** @var ICertificateManager */ private $systemCertificateManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock('\OCP\IRequest'); diff --git a/tests/Settings/Controller/CheckSetupControllerTest.php b/tests/Settings/Controller/CheckSetupControllerTest.php index 9bb2143e9d9a..cb2c096a5c8a 100644 --- a/tests/Settings/Controller/CheckSetupControllerTest.php +++ b/tests/Settings/Controller/CheckSetupControllerTest.php @@ -60,7 +60,7 @@ class CheckSetupControllerTest extends TestCase { /** @var Checker | \PHPUnit\Framework\MockObject\MockObject */ private $checker; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder('\OCP\IRequest') diff --git a/tests/Settings/Controller/CorsControllerTest.php b/tests/Settings/Controller/CorsControllerTest.php index 94b6a472efc9..09484f04d113 100644 --- a/tests/Settings/Controller/CorsControllerTest.php +++ b/tests/Settings/Controller/CorsControllerTest.php @@ -56,7 +56,7 @@ class CorsControllerTest extends TestCase { /** @var IUser */ private $userSession; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->createMock(IRequest::class); diff --git a/tests/Settings/Controller/GroupsControllerTest.php b/tests/Settings/Controller/GroupsControllerTest.php index d115d64c8909..ecefa264134d 100644 --- a/tests/Settings/Controller/GroupsControllerTest.php +++ b/tests/Settings/Controller/GroupsControllerTest.php @@ -27,7 +27,7 @@ class GroupsControllerTest extends \Test\TestCase { /** @var GroupsController */ private $groupsController; - protected function setUp() { + protected function setUp(): void { $app = new Application(); $this->container = $app->getContainer(); $this->container['AppName'] = 'settings'; diff --git a/tests/Settings/Controller/LegalControllerTest.php b/tests/Settings/Controller/LegalControllerTest.php index 7acdeccb7cb7..3548cd8dc07f 100644 --- a/tests/Settings/Controller/LegalControllerTest.php +++ b/tests/Settings/Controller/LegalControllerTest.php @@ -39,7 +39,7 @@ class LegalSettingsControllerTest extends \Test\TestCase { */ private $legalSettingsController; - protected function setUp() { + protected function setUp(): void { $app = new Application(); $this->container = $app->getContainer(); $this->container['Config'] = $this->getMockBuilder(IConfig::class) diff --git a/tests/Settings/Controller/LogSettingsControllerTest.php b/tests/Settings/Controller/LogSettingsControllerTest.php index cae35eb97221..a179fca7d7aa 100644 --- a/tests/Settings/Controller/LogSettingsControllerTest.php +++ b/tests/Settings/Controller/LogSettingsControllerTest.php @@ -24,7 +24,7 @@ class LogSettingsControllerTest extends \Test\TestCase { /** @var LogSettingsController */ private $logSettingsController; - protected function setUp() { + protected function setUp(): void { $app = new Application(); $this->container = $app->getContainer(); $this->container['Config'] = $this->getMockBuilder('\OCP\IConfig') diff --git a/tests/Settings/Controller/MailSettingsControllerTest.php b/tests/Settings/Controller/MailSettingsControllerTest.php index 6256730ea822..e8c2eeac2433 100644 --- a/tests/Settings/Controller/MailSettingsControllerTest.php +++ b/tests/Settings/Controller/MailSettingsControllerTest.php @@ -18,7 +18,7 @@ class MailSettingsControllerTest extends \Test\TestCase { private $container; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $app = new Application(); diff --git a/tests/Settings/Controller/SettingsPageControllerTest.php b/tests/Settings/Controller/SettingsPageControllerTest.php index 02fdd5785470..2e7362f6a806 100644 --- a/tests/Settings/Controller/SettingsPageControllerTest.php +++ b/tests/Settings/Controller/SettingsPageControllerTest.php @@ -46,7 +46,7 @@ class SettingsPageControllerTest extends TestCase { /** @var IFactory */ protected $lfactory; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class)->getMock(); diff --git a/tests/Settings/Controller/UsersControllerTest.php b/tests/Settings/Controller/UsersControllerTest.php index 289802cab7d7..25e1501e0bf6 100644 --- a/tests/Settings/Controller/UsersControllerTest.php +++ b/tests/Settings/Controller/UsersControllerTest.php @@ -45,7 +45,7 @@ class UsersControllerTest extends \Test\TestCase { /** @var \OCP\AppFramework\IAppContainer */ private $container; - protected function setUp() { + protected function setUp(): void { $app = new Application(); $this->container = $app->getContainer(); $this->container['AppName'] = 'settings'; diff --git a/tests/Settings/Middleware/SubadminMiddlewareTest.php b/tests/Settings/Middleware/SubadminMiddlewareTest.php index 46fa803aac5b..ebb759803037 100644 --- a/tests/Settings/Middleware/SubadminMiddlewareTest.php +++ b/tests/Settings/Middleware/SubadminMiddlewareTest.php @@ -32,7 +32,7 @@ class SubadminMiddlewareTest extends \Test\TestCase { /** @var Controller */ private $controller; - protected function setUp() { + protected function setUp(): void { $this->reflector = $this->getMockBuilder('\OC\AppFramework\Utility\ControllerMethodReflector') ->disableOriginalConstructor()->getMock(); $this->controller = $this->getMockBuilder('\OCP\AppFramework\Controller') diff --git a/tests/Settings/Panels/Admin/AppsTest.php b/tests/Settings/Panels/Admin/AppsTest.php index 51bb0a1a0440..dc8cf5225ba9 100644 --- a/tests/Settings/Panels/Admin/AppsTest.php +++ b/tests/Settings/Panels/Admin/AppsTest.php @@ -23,7 +23,7 @@ class AppsTest extends \Test\TestCase { /** @var IConfig */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); $this->panel = new Apps($this->config); diff --git a/tests/Settings/Panels/Admin/BackgroundJobsTest.php b/tests/Settings/Panels/Admin/BackgroundJobsTest.php index dbd235a64cf5..fcb4fab357e7 100644 --- a/tests/Settings/Panels/Admin/BackgroundJobsTest.php +++ b/tests/Settings/Panels/Admin/BackgroundJobsTest.php @@ -24,7 +24,7 @@ class BackgroundJobsTest extends \Test\TestCase { /** @var IConfig */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config =$this->getMockBuilder(IConfig::class)->getMock(); $this->panel = new BackgroundJobs($this->config); diff --git a/tests/Settings/Panels/Admin/CertificatesTest.php b/tests/Settings/Panels/Admin/CertificatesTest.php index 1d434615c1e5..3f5038aa20fe 100644 --- a/tests/Settings/Panels/Admin/CertificatesTest.php +++ b/tests/Settings/Panels/Admin/CertificatesTest.php @@ -30,7 +30,7 @@ class CertificatesTest extends \Test\TestCase { /** @var ICertificateManager */ private $certManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->urlGenerator =$this->getMockBuilder(IURLGenerator::class)->getMock(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); diff --git a/tests/Settings/Panels/Admin/EncryptionTest.php b/tests/Settings/Panels/Admin/EncryptionTest.php index bee48b0a8a40..547227c201f6 100644 --- a/tests/Settings/Panels/Admin/EncryptionTest.php +++ b/tests/Settings/Panels/Admin/EncryptionTest.php @@ -20,7 +20,7 @@ class EncryptionTest extends \Test\TestCase { /** @var Encryption */ private $panel; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->panel = new Encryption(); } diff --git a/tests/Settings/Panels/Admin/FileSharingTest.php b/tests/Settings/Panels/Admin/FileSharingTest.php index 645dee602714..76339b8b5d8e 100644 --- a/tests/Settings/Panels/Admin/FileSharingTest.php +++ b/tests/Settings/Panels/Admin/FileSharingTest.php @@ -27,7 +27,7 @@ class FileSharingTest extends \Test\TestCase { /** @var Helper */ private $helper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); $this->helper = $this->getMockBuilder(Helper::class)->getMock(); diff --git a/tests/Settings/Panels/Admin/LegacyTest.php b/tests/Settings/Panels/Admin/LegacyTest.php index 5ee93c0a3358..e7331b7d7b73 100644 --- a/tests/Settings/Panels/Admin/LegacyTest.php +++ b/tests/Settings/Panels/Admin/LegacyTest.php @@ -23,7 +23,7 @@ class LegacyTest extends \Test\TestCase { /** @var Helper */ private $helper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->helper = $this->getMockBuilder(Helper::class)->getMock(); $this->panel = new Legacy($this->helper); diff --git a/tests/Settings/Panels/Admin/LegalTest.php b/tests/Settings/Panels/Admin/LegalTest.php index bd7df2e11cd8..6e6ab4173c68 100644 --- a/tests/Settings/Panels/Admin/LegalTest.php +++ b/tests/Settings/Panels/Admin/LegalTest.php @@ -33,7 +33,7 @@ class LegalTest extends \Test\TestCase { /** @var IConfig */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); $this->panel = new Legal($this->config); diff --git a/tests/Settings/Panels/Admin/LoggingTest.php b/tests/Settings/Panels/Admin/LoggingTest.php index 05ecb9fc264d..0efc2360e0bd 100644 --- a/tests/Settings/Panels/Admin/LoggingTest.php +++ b/tests/Settings/Panels/Admin/LoggingTest.php @@ -29,7 +29,7 @@ class LoggingTest extends \Test\TestCase { /** @var Helper */ private $helper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->getMock(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); diff --git a/tests/Settings/Panels/Admin/MailTest.php b/tests/Settings/Panels/Admin/MailTest.php index 58e5bb56b990..d38b9731ac65 100644 --- a/tests/Settings/Panels/Admin/MailTest.php +++ b/tests/Settings/Panels/Admin/MailTest.php @@ -26,7 +26,7 @@ class MailTest extends \Test\TestCase { /** @var Helper */ private $helper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); $this->helper = $this->getMockBuilder(Helper::class)->getMock(); diff --git a/tests/Settings/Panels/Admin/SecurityWarningTest.php b/tests/Settings/Panels/Admin/SecurityWarningTest.php index d490abe2fc57..02a8916fffee 100644 --- a/tests/Settings/Panels/Admin/SecurityWarningTest.php +++ b/tests/Settings/Panels/Admin/SecurityWarningTest.php @@ -35,7 +35,7 @@ class SecurityWarningTest extends \Test\TestCase { /** @var Helper */ private $helper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->l = $this->getMockBuilder(IL10N::class)->getMock(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); diff --git a/tests/Settings/Panels/Admin/TipsTest.php b/tests/Settings/Panels/Admin/TipsTest.php index 57df06c2e17c..8abc2668e871 100644 --- a/tests/Settings/Panels/Admin/TipsTest.php +++ b/tests/Settings/Panels/Admin/TipsTest.php @@ -20,7 +20,7 @@ class TipsTest extends \Test\TestCase { /** @var Tips */ private $panel; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->panel = new Tips(); } diff --git a/tests/Settings/Panels/Personal/ClientsTest.php b/tests/Settings/Panels/Personal/ClientsTest.php index fa57eaafa534..61027b015b02 100644 --- a/tests/Settings/Panels/Personal/ClientsTest.php +++ b/tests/Settings/Panels/Personal/ClientsTest.php @@ -26,7 +26,7 @@ class ClientsTest extends \Test\TestCase { /** @var Defaults */ private $defaults; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); $this->defaults = $this->getMockBuilder(Defaults::class)->getMock(); diff --git a/tests/Settings/Panels/Personal/LegacyTest.php b/tests/Settings/Panels/Personal/LegacyTest.php index 6d0d9bab996b..587b5b229a72 100644 --- a/tests/Settings/Panels/Personal/LegacyTest.php +++ b/tests/Settings/Panels/Personal/LegacyTest.php @@ -23,7 +23,7 @@ class LegacyTest extends \Test\TestCase { /** @var Helper */ private $helper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->helper = $this->getMockBuilder(Helper::class)->getMock(); $this->panel = new Legacy($this->helper); diff --git a/tests/Settings/Panels/Personal/ProfileTest.php b/tests/Settings/Panels/Personal/ProfileTest.php index 088e6417030b..5f8b2f3e281d 100644 --- a/tests/Settings/Panels/Personal/ProfileTest.php +++ b/tests/Settings/Panels/Personal/ProfileTest.php @@ -34,7 +34,7 @@ class ProfileTest extends \Test\TestCase { /** @var IUserSession */ private $userSession; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); $this->groupManager = $this->getMockBuilder(IGroupManager::class)->getMock(); diff --git a/tests/Settings/Panels/Personal/QuotaTest.php b/tests/Settings/Panels/Personal/QuotaTest.php index 20ab741ecb24..04dcd8edf576 100644 --- a/tests/Settings/Panels/Personal/QuotaTest.php +++ b/tests/Settings/Panels/Personal/QuotaTest.php @@ -23,7 +23,7 @@ class QuotaTest extends \Test\TestCase { /** @var Helper */ private $helper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->helper = $this->getMockBuilder(Helper::class)->getMock(); $this->panel = new Quota($this->helper); diff --git a/tests/Settings/Panels/Personal/TokensTest.php b/tests/Settings/Panels/Personal/TokensTest.php index 5328444b7f0a..9a3732138bac 100644 --- a/tests/Settings/Panels/Personal/TokensTest.php +++ b/tests/Settings/Panels/Personal/TokensTest.php @@ -20,7 +20,7 @@ class TokensTest extends \Test\TestCase { /** @var Tokens */ private $panel; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->panel = new Tokens; } diff --git a/tests/Settings/Panels/Personal/VersionTest.php b/tests/Settings/Panels/Personal/VersionTest.php index 4b5c8fb74292..a54b5913a45d 100644 --- a/tests/Settings/Panels/Personal/VersionTest.php +++ b/tests/Settings/Panels/Personal/VersionTest.php @@ -20,7 +20,7 @@ class VersionTest extends \Test\TestCase { /** @var Version */ private $panel; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->panel = new Version; } diff --git a/tests/TestHelpers/Unit/DeleteHelperTest.php b/tests/TestHelpers/Unit/DeleteHelperTest.php index 00aa9dfe0e20..005dc1887d79 100644 --- a/tests/TestHelpers/Unit/DeleteHelperTest.php +++ b/tests/TestHelpers/Unit/DeleteHelperTest.php @@ -36,7 +36,7 @@ class DeleteHelperTest extends PHPUnit\Framework\TestCase { * * @return void */ - public function setUp() { + public function setUp(): void { $mock = new Mock( [ new Response(204, [])] ); diff --git a/tests/TestHelpers/Unit/WebDavHelperTest.php b/tests/TestHelpers/Unit/WebDavHelperTest.php index d34871cbd158..4f332f7cea40 100644 --- a/tests/TestHelpers/Unit/WebDavHelperTest.php +++ b/tests/TestHelpers/Unit/WebDavHelperTest.php @@ -36,7 +36,7 @@ class WebDavHelperTest extends PHPUnit\Framework\TestCase { * * @return void */ - public function setUp() { + public function setUp(): void { // mocks is not used, but is required. Else it will try to // contact original server and will fail our tests. $mock = new Mock( diff --git a/tests/lib/Activity/ManagerTest.php b/tests/lib/Activity/ManagerTest.php index 0f40795d09e4..00e2c2b6163c 100644 --- a/tests/lib/Activity/ManagerTest.php +++ b/tests/lib/Activity/ManagerTest.php @@ -26,7 +26,7 @@ class ManagerTest extends TestCase { /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder('OCP\IRequest') diff --git a/tests/lib/Activity/NullSession/ManagerTest.php b/tests/lib/Activity/NullSession/ManagerTest.php index 13630518fbc4..e8a509c4d903 100644 --- a/tests/lib/Activity/NullSession/ManagerTest.php +++ b/tests/lib/Activity/NullSession/ManagerTest.php @@ -27,7 +27,7 @@ class ManagerTest extends TestCase { /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ protected $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder(IRequest::class) diff --git a/tests/lib/App/CodeChecker/InfoCheckerTest.php b/tests/lib/App/CodeChecker/InfoCheckerTest.php index 2a70a9591545..bae07c12a5e5 100644 --- a/tests/lib/App/CodeChecker/InfoCheckerTest.php +++ b/tests/lib/App/CodeChecker/InfoCheckerTest.php @@ -32,7 +32,7 @@ class InfoCheckerTest extends TestCase { /** @var IAppManager | \PHPUnit\Framework\MockObject\MockObject */ protected $appManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appManager = $this->getMockBuilder(IAppManager::class) diff --git a/tests/lib/App/DependencyAnalyzerTest.php b/tests/lib/App/DependencyAnalyzerTest.php index 863b4a3de3a0..cf295ec3089a 100644 --- a/tests/lib/App/DependencyAnalyzerTest.php +++ b/tests/lib/App/DependencyAnalyzerTest.php @@ -25,7 +25,7 @@ class DependencyAnalyzerTest extends TestCase { /** @var DependencyAnalyzer */ private $analyser; - public function setUp() { + public function setUp(): void { $this->platformMock = $this->getMockBuilder(Platform::class) ->disableOriginalConstructor() ->getMock(); diff --git a/tests/lib/App/InfoParserTest.php b/tests/lib/App/InfoParserTest.php index 457f90e15f9d..13396f5d66a4 100644 --- a/tests/lib/App/InfoParserTest.php +++ b/tests/lib/App/InfoParserTest.php @@ -18,7 +18,7 @@ class InfoParserTest extends TestCase { /** @var InfoParser */ private $parser; - public function setUp() { + public function setUp(): void { $this->parser = new InfoParser(); } diff --git a/tests/lib/App/ManagerTest.php b/tests/lib/App/ManagerTest.php index 3184d6e85d10..f94cc19591d8 100644 --- a/tests/lib/App/ManagerTest.php +++ b/tests/lib/App/ManagerTest.php @@ -89,7 +89,7 @@ protected function getAppConfig() { return $config; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userSession = $this->createMock(IUserSession::class); diff --git a/tests/lib/AppConfigTest.php b/tests/lib/AppConfigTest.php index 6e8073f33dfb..cf44679948fa 100644 --- a/tests/lib/AppConfigTest.php +++ b/tests/lib/AppConfigTest.php @@ -26,7 +26,7 @@ class AppConfigTest extends TestCase { protected $originalConfig; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -111,7 +111,7 @@ public function setUp() { ])->execute(); } - public function tearDown() { + public function tearDown(): void { $sql = $this->connection->getQueryBuilder(); $sql->delete('appconfig'); $sql->execute(); diff --git a/tests/lib/AppFramework/AppTest.php b/tests/lib/AppFramework/AppTest.php index 6ff1c12a9539..345da7994f8c 100644 --- a/tests/lib/AppFramework/AppTest.php +++ b/tests/lib/AppFramework/AppTest.php @@ -51,7 +51,7 @@ class AppTest extends \Test\TestCase { private $controllerMethod; private $appPath; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->container = new \OC\AppFramework\DependencyInjection\DIContainer('test', []); @@ -118,7 +118,7 @@ public function testBuildAppNamespaceInfoXml() { $this->assertEquals('OCA\NameSpaceTestApp', $ns); } - protected function tearDown() { + protected function tearDown(): void { rrmdir($this->appPath); parent::tearDown(); } diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php index db1cd156c670..b9d8bc0c3d88 100644 --- a/tests/lib/AppFramework/Controller/ControllerTest.php +++ b/tests/lib/AppFramework/Controller/ControllerTest.php @@ -67,7 +67,7 @@ class ControllerTest extends TestCase { /** @var DIContainer */ private $app; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $request = new Request( diff --git a/tests/lib/AppFramework/Db/EntityTest.php b/tests/lib/AppFramework/Db/EntityTest.php index d2aaa69cee14..f5da2cdf9212 100644 --- a/tests/lib/AppFramework/Db/EntityTest.php +++ b/tests/lib/AppFramework/Db/EntityTest.php @@ -52,7 +52,7 @@ public function __construct($name=null) { class EntityTest extends \Test\TestCase { private $entity; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->entity = new TestEntity(); } diff --git a/tests/lib/AppFramework/Db/MapperTest.php b/tests/lib/AppFramework/Db/MapperTest.php index 45e56b5bf361..9dba80eecc89 100644 --- a/tests/lib/AppFramework/Db/MapperTest.php +++ b/tests/lib/AppFramework/Db/MapperTest.php @@ -68,7 +68,7 @@ class MapperTest extends MapperTestUtility { */ private $mapper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->mapper = new ExampleMapper($this->db); } diff --git a/tests/lib/AppFramework/Db/MapperTestUtility.php b/tests/lib/AppFramework/Db/MapperTestUtility.php index 1359f66de0be..4e6d24e88810 100644 --- a/tests/lib/AppFramework/Db/MapperTestUtility.php +++ b/tests/lib/AppFramework/Db/MapperTestUtility.php @@ -38,7 +38,7 @@ abstract class MapperTestUtility extends \Test\TestCase { * Run this function before the actual test to either set or initialize the * db. After this the db can be accessed by using $this->db */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->db = $this->getMockBuilder( diff --git a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php index f8176d4182f8..d035fc697386 100644 --- a/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php +++ b/tests/lib/AppFramework/DependencyInjection/DIContainerTest.php @@ -31,7 +31,7 @@ class DIContainerTest extends \Test\TestCase { private $container; private $api; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->container = $this->getMockBuilder('OC\AppFramework\DependencyInjection\DIContainer') ->setMethods(['isAdminUser']) diff --git a/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php b/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php index 469bf3b7962d..856c9e502508 100644 --- a/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php +++ b/tests/lib/AppFramework/Http/ContentSecurityPolicyTest.php @@ -21,7 +21,7 @@ class ContentSecurityPolicyTest extends TestCase { /** @var ContentSecurityPolicy */ private $contentSecurityPolicy; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->contentSecurityPolicy = new ContentSecurityPolicy(); } diff --git a/tests/lib/AppFramework/Http/DataResponseTest.php b/tests/lib/AppFramework/Http/DataResponseTest.php index c515a7eb8c81..c9ee4c12ccaa 100644 --- a/tests/lib/AppFramework/Http/DataResponseTest.php +++ b/tests/lib/AppFramework/Http/DataResponseTest.php @@ -34,7 +34,7 @@ class DataResponseTest extends TestCase { */ private $response; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->response = new DataResponse(); } diff --git a/tests/lib/AppFramework/Http/DispatcherTest.php b/tests/lib/AppFramework/Http/DispatcherTest.php index 9596016785df..05c5af2f1ce9 100644 --- a/tests/lib/AppFramework/Http/DispatcherTest.php +++ b/tests/lib/AppFramework/Http/DispatcherTest.php @@ -88,7 +88,7 @@ class DispatcherTest extends \Test\TestCase { /** @var Controller | \PHPUnit\Framework\MockObject\MockObject */ private $controller; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->controllerMethod = 'test'; diff --git a/tests/lib/AppFramework/Http/DownloadResponseTest.php b/tests/lib/AppFramework/Http/DownloadResponseTest.php index 4fe15f9d01e0..8cb8404252d9 100644 --- a/tests/lib/AppFramework/Http/DownloadResponseTest.php +++ b/tests/lib/AppFramework/Http/DownloadResponseTest.php @@ -35,7 +35,7 @@ class DownloadResponseTest extends \Test\TestCase { */ protected $response; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->response = new ChildDownloadResponse('file', 'content'); } diff --git a/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php b/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php index 579994e5800e..7b415b441c4d 100644 --- a/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php +++ b/tests/lib/AppFramework/Http/EmptyContentSecurityPolicyTest.php @@ -21,7 +21,7 @@ class EmptyContentSecurityPolicyTest extends TestCase { /** @var EmptyContentSecurityPolicy */ private $contentSecurityPolicy; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->contentSecurityPolicy = new EmptyContentSecurityPolicy(); } diff --git a/tests/lib/AppFramework/Http/HttpTest.php b/tests/lib/AppFramework/Http/HttpTest.php index 8a89c7d18d29..737880addbd2 100644 --- a/tests/lib/AppFramework/Http/HttpTest.php +++ b/tests/lib/AppFramework/Http/HttpTest.php @@ -33,7 +33,7 @@ class HttpTest extends \Test\TestCase { */ private $http; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->server = []; diff --git a/tests/lib/AppFramework/Http/JSONResponseTest.php b/tests/lib/AppFramework/Http/JSONResponseTest.php index 3c28d514913f..2ff551b94226 100644 --- a/tests/lib/AppFramework/Http/JSONResponseTest.php +++ b/tests/lib/AppFramework/Http/JSONResponseTest.php @@ -35,7 +35,7 @@ class JSONResponseTest extends \Test\TestCase { */ private $json; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->json = new JSONResponse(); } diff --git a/tests/lib/AppFramework/Http/RedirectResponseTest.php b/tests/lib/AppFramework/Http/RedirectResponseTest.php index afb3b7d045d4..f2a26a274cff 100644 --- a/tests/lib/AppFramework/Http/RedirectResponseTest.php +++ b/tests/lib/AppFramework/Http/RedirectResponseTest.php @@ -33,7 +33,7 @@ class RedirectResponseTest extends \Test\TestCase { */ protected $response; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->response = new RedirectResponse('/url'); } diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php index 417bf6933199..b9a4f82adf6a 100644 --- a/tests/lib/AppFramework/Http/RequestTest.php +++ b/tests/lib/AppFramework/Http/RequestTest.php @@ -33,7 +33,7 @@ class RequestTest extends TestCase { /** @var CsrfTokenManager | \PHPUnit\Framework\MockObject\MockObject */ protected $csrfTokenManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); if (\in_array('fakeinput', \stream_get_wrappers())) { @@ -47,7 +47,7 @@ protected function setUp() { ->disableOriginalConstructor()->getMock(); } - protected function tearDown() { + protected function tearDown(): void { \stream_wrapper_unregister('fakeinput'); parent::tearDown(); } diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php index ba7b725b29ee..980dba430c76 100644 --- a/tests/lib/AppFramework/Http/ResponseTest.php +++ b/tests/lib/AppFramework/Http/ResponseTest.php @@ -37,7 +37,7 @@ class ResponseTest extends TestCase { */ private $childResponse; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->childResponse = new Response(); } diff --git a/tests/lib/AppFramework/Http/StreamResponseTest.php b/tests/lib/AppFramework/Http/StreamResponseTest.php index dd74c3530c3f..5c6922f04972 100644 --- a/tests/lib/AppFramework/Http/StreamResponseTest.php +++ b/tests/lib/AppFramework/Http/StreamResponseTest.php @@ -32,7 +32,7 @@ class StreamResponseTest extends \Test\TestCase { /** @var IOutput */ private $output; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->output = $this->createMock('OCP\\AppFramework\\Http\\IOutput'); } diff --git a/tests/lib/AppFramework/Http/TemplateResponseTest.php b/tests/lib/AppFramework/Http/TemplateResponseTest.php index 9c99f8409fc5..dd3868ba54b6 100644 --- a/tests/lib/AppFramework/Http/TemplateResponseTest.php +++ b/tests/lib/AppFramework/Http/TemplateResponseTest.php @@ -35,7 +35,7 @@ class TemplateResponseTest extends TestCase { /** @var \OCP\AppFramework\IApi */ private $api; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->api = $this->getMockBuilder('OC\AppFramework\Core\API') diff --git a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php index 351c5de433da..f1bf26a89511 100644 --- a/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php +++ b/tests/lib/AppFramework/Middleware/MiddlewareDispatcherTest.php @@ -109,7 +109,7 @@ class MiddlewareDispatcherTest extends \Test\TestCase { */ private $dispatcher; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->dispatcher = new MiddlewareDispatcher(); diff --git a/tests/lib/AppFramework/Middleware/MiddlewareTest.php b/tests/lib/AppFramework/Middleware/MiddlewareTest.php index 5317e6eba7a4..50a163933d15 100644 --- a/tests/lib/AppFramework/Middleware/MiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/MiddlewareTest.php @@ -42,7 +42,7 @@ class MiddlewareTest extends \Test\TestCase { /** @var Response */ private $response; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->middleware = new ChildMiddleware(); diff --git a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php index 27e6a63c5b55..c2bb717d451c 100644 --- a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php @@ -43,7 +43,7 @@ public function providesConfigForPublicPageTest() { ]; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index 9a4a68e790b9..a2ff6bb372f5 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -72,7 +72,7 @@ class SecurityMiddlewareTest extends TestCase { /** @var IUserSession | \PHPUnit\Framework\MockObject\MockObject */ private $session; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->controller = $this->getMockBuilder(Controller::class) diff --git a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php index 51df557dbd08..3ae26f3bbc42 100644 --- a/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/SessionMiddlewareTest.php @@ -28,7 +28,7 @@ class SessionMiddlewareTest extends \Test\TestCase { */ private $request; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->request = new Request( diff --git a/tests/lib/AppFramework/Utility/SimpleContainerTest.php b/tests/lib/AppFramework/Utility/SimpleContainerTest.php index 66d710ff0aa4..a121cc2a5257 100644 --- a/tests/lib/AppFramework/Utility/SimpleContainerTest.php +++ b/tests/lib/AppFramework/Utility/SimpleContainerTest.php @@ -62,7 +62,7 @@ class SimpleContainerTest extends \Test\TestCase { /** @var SimpleContainer */ private $container; - public function setUp() { + public function setUp(): void { $this->container = new SimpleContainer(); } diff --git a/tests/lib/Archive/TARTest.php b/tests/lib/Archive/TARTest.php index ffa4a3710416..ddace27eb96a 100644 --- a/tests/lib/Archive/TARTest.php +++ b/tests/lib/Archive/TARTest.php @@ -11,7 +11,7 @@ use OC\Archive\TAR; class TARTest extends TestBase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); } diff --git a/tests/lib/Archive/ZIPTest.php b/tests/lib/Archive/ZIPTest.php index 4863fce1ae85..246f54646c0f 100644 --- a/tests/lib/Archive/ZIPTest.php +++ b/tests/lib/Archive/ZIPTest.php @@ -11,7 +11,7 @@ use OC\Archive\ZIP; class ZIPTest extends TestBase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); } diff --git a/tests/lib/Authentication/AccountModule/ManagerTest.php b/tests/lib/Authentication/AccountModule/ManagerTest.php index 56d1beda3611..a9ded8f5314b 100644 --- a/tests/lib/Authentication/AccountModule/ManagerTest.php +++ b/tests/lib/Authentication/AccountModule/ManagerTest.php @@ -46,7 +46,7 @@ class ManagerTest extends TestCase { /** @var Manager */ private $manager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->createMock(IUser::class); diff --git a/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php b/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php index 59083b058963..2d26c5a5c90a 100644 --- a/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenCleanupJobTest.php @@ -31,7 +31,7 @@ class DefaultTokenCleanupJobTest extends TestCase { private $job; private $tokenProvider; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tokenProvider = $this->getMockBuilder('\OC\Authentication\Token\DefaultTokenProvider') @@ -41,7 +41,7 @@ protected function setUp() { $this->job = new DefaultTokenCleanupJob(); } - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); $this->restoreService('\OC\Authentication\Token\DefaultTokenProvider'); diff --git a/tests/lib/Authentication/Token/DefaultTokenMapperTest.php b/tests/lib/Authentication/Token/DefaultTokenMapperTest.php index 53f40e6e81c4..d39d50a98c7a 100644 --- a/tests/lib/Authentication/Token/DefaultTokenMapperTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenMapperTest.php @@ -45,7 +45,7 @@ class DefaultTokenMapperTest extends TestCase { private $dbConnection; private $time; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->dbConnection = OC::$server->getDatabaseConnection(); diff --git a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php index 0eab1471c783..35e2dd372e15 100644 --- a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php @@ -38,7 +38,7 @@ class DefaultTokenProviderTest extends TestCase { private $timeFactory; private $time; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->mapper = $this->getMockBuilder('\OC\Authentication\Token\DefaultTokenMapper') diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php index fdb9b47a4f3c..f54f9951b294 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php @@ -45,7 +45,7 @@ class ManagerTest extends TestCase { /** @var \OCP\Authentication\TwoFactorAuth\IProvider|\PHPUnit\Framework\MockObject\MockObject */ private $fakeProvider; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->createMock('\OCP\IUser'); diff --git a/tests/lib/AutoLoaderTest.php b/tests/lib/AutoLoaderTest.php index ed431360e32f..cc3ea677b551 100644 --- a/tests/lib/AutoLoaderTest.php +++ b/tests/lib/AutoLoaderTest.php @@ -16,7 +16,7 @@ class AutoLoaderTest extends TestCase { */ private $loader; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->loader = new AutoLoader(); } diff --git a/tests/lib/AvatarManagerTest.php b/tests/lib/AvatarManagerTest.php index d38c2ea52900..55e5e428f778 100644 --- a/tests/lib/AvatarManagerTest.php +++ b/tests/lib/AvatarManagerTest.php @@ -60,7 +60,7 @@ class AvatarManagerTest extends TestCase { /** @var ILogger | \PHPUnit\Framework\MockObject\MockObject */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userManager = $this->createMock(IUserManager::class); diff --git a/tests/lib/AvatarTest.php b/tests/lib/AvatarTest.php index 447512b243cf..b6f0ad4c3614 100644 --- a/tests/lib/AvatarTest.php +++ b/tests/lib/AvatarTest.php @@ -27,7 +27,7 @@ class AvatarTest extends \Test\TestCase { /** @var \OC\User\User | \PHPUnit\Framework\MockObject\MockObject $user */ private $user; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->storage = $this->createMock(IStorage::class); diff --git a/tests/lib/BackgroundJob/JobListTest.php b/tests/lib/BackgroundJob/JobListTest.php index d53be78a7efd..d12f701eac71 100644 --- a/tests/lib/BackgroundJob/JobListTest.php +++ b/tests/lib/BackgroundJob/JobListTest.php @@ -35,7 +35,7 @@ class JobListTest extends TestCase { /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */ protected $logger; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); diff --git a/tests/lib/BackgroundJob/JobTest.php b/tests/lib/BackgroundJob/JobTest.php index 7923eef11ef6..4c13798da25b 100644 --- a/tests/lib/BackgroundJob/JobTest.php +++ b/tests/lib/BackgroundJob/JobTest.php @@ -11,7 +11,7 @@ class JobTest extends \Test\TestCase { private $run = false; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->run = false; } diff --git a/tests/lib/BackgroundJob/QueuedJobTest.php b/tests/lib/BackgroundJob/QueuedJobTest.php index a3e9cc296a0d..2ff39dd78f6c 100644 --- a/tests/lib/BackgroundJob/QueuedJobTest.php +++ b/tests/lib/BackgroundJob/QueuedJobTest.php @@ -39,7 +39,7 @@ public function markRun() { $this->jobRun = true; } - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->jobList = new DummyJobList(); diff --git a/tests/lib/BackgroundJob/TimedJobTest.php b/tests/lib/BackgroundJob/TimedJobTest.php index c8e5addcb87b..bdd44978bf01 100644 --- a/tests/lib/BackgroundJob/TimedJobTest.php +++ b/tests/lib/BackgroundJob/TimedJobTest.php @@ -40,7 +40,7 @@ public function markRun() { $this->jobRun = true; } - protected function setup() { + protected function setUp(): void { parent::setUp(); $this->jobList = new DummyJobList(); diff --git a/tests/lib/Cache/CappedMemoryCacheTest.php b/tests/lib/Cache/CappedMemoryCacheTest.php index 3823f0a3bebd..6d6d4878b83b 100644 --- a/tests/lib/Cache/CappedMemoryCacheTest.php +++ b/tests/lib/Cache/CappedMemoryCacheTest.php @@ -30,7 +30,7 @@ * @package Test\Cache */ class CappedMemoryCacheTest extends TestCache { - public function setUp() { + public function setUp(): void { parent::setUp(); $this->instance = new \OC\Cache\CappedMemoryCache(); } diff --git a/tests/lib/Cache/FileCacheTest.php b/tests/lib/Cache/FileCacheTest.php index 6d334e9a182b..8e0b623b75b6 100644 --- a/tests/lib/Cache/FileCacheTest.php +++ b/tests/lib/Cache/FileCacheTest.php @@ -51,7 +51,7 @@ class FileCacheTest extends TestCache { * */ private $rootView; - protected function setUp() { + protected function setUp(): void { parent::setUp(); //clear all proxies and hooks so we can do clean testing @@ -83,7 +83,7 @@ protected function setUp() { $this->instance->set('hack', 'hack'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->remove('hack', 'hack'); } diff --git a/tests/lib/Cache/TestCache.php b/tests/lib/Cache/TestCache.php index d7a2215c9c68..2aa30baabf9d 100644 --- a/tests/lib/Cache/TestCache.php +++ b/tests/lib/Cache/TestCache.php @@ -14,7 +14,7 @@ abstract class TestCache extends \Test\TestCase { */ protected $instance; - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->clear(); } diff --git a/tests/lib/Command/AsyncBusTest.php b/tests/lib/Command/AsyncBusTest.php index 9a9f6b7a3c8b..c8153c5618c7 100644 --- a/tests/lib/Command/AsyncBusTest.php +++ b/tests/lib/Command/AsyncBusTest.php @@ -80,7 +80,7 @@ public static function DummyCommand() { self::$lastCommand = 'static'; } - public function setUp() { + public function setUp(): void { $this->jobList = new DummyJobList(); $this->bus = new \OC\Command\AsyncBus($this->jobList); self::$lastCommand = ''; diff --git a/tests/lib/Command/Integrity/SignAppTest.php b/tests/lib/Command/Integrity/SignAppTest.php index fd1da87fdb0c..de4c4f94dffd 100644 --- a/tests/lib/Command/Integrity/SignAppTest.php +++ b/tests/lib/Command/Integrity/SignAppTest.php @@ -36,7 +36,7 @@ class SignAppTest extends TestCase { /** @var IURLGenerator */ private $urlGenerator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->checker = $this->getMockBuilder('\OC\IntegrityCheck\Checker') ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Command/Integrity/SignCoreTest.php b/tests/lib/Command/Integrity/SignCoreTest.php index 701eceadf4e6..04cdd01f3eda 100644 --- a/tests/lib/Command/Integrity/SignCoreTest.php +++ b/tests/lib/Command/Integrity/SignCoreTest.php @@ -33,7 +33,7 @@ class SignCoreTest extends TestCase { /** @var FileAccessHelper */ private $fileAccessHelper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->checker = $this->getMockBuilder('\OC\IntegrityCheck\Checker') ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Command/User/SyncBackendTest.php b/tests/lib/Command/User/SyncBackendTest.php index a90293f90927..0f4edd085266 100644 --- a/tests/lib/Command/User/SyncBackendTest.php +++ b/tests/lib/Command/User/SyncBackendTest.php @@ -50,7 +50,7 @@ class SyncBackendTest extends TestCase { /** @var UserInterface | \PHPUnit\Framework\MockObject\MockObject */ private $dummyBackend; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php index 660c31d9e239..cf312f5e95f9 100644 --- a/tests/lib/Comments/ManagerTest.php +++ b/tests/lib/Comments/ManagerTest.php @@ -19,7 +19,7 @@ class ManagerTest extends TestCase { /** @var IDBConnection */ private $dbConn; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dbConn = \OC::$server->getDatabaseConnection(); @@ -29,7 +29,7 @@ public function setUp() { $this->dbConn->prepare($sql)->execute(); } - public function tearDown() { + public function tearDown(): void { $this->dbConn->getQueryBuilder()->delete('comments')->execute(); $this->dbConn->getQueryBuilder()->delete('comments_read_markers')->execute(); parent::tearDown(); diff --git a/tests/lib/ConfigTest.php b/tests/lib/ConfigTest.php index 0f13307b7443..ef22d355545a 100644 --- a/tests/lib/ConfigTest.php +++ b/tests/lib/ConfigTest.php @@ -28,7 +28,7 @@ class ConfigTest extends TestCase { /** @var string */ private $randomTmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->randomTmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -37,7 +37,7 @@ protected function setUp() { $this->config = new \OC\Config($this->randomTmpDir, 'testconfig.php'); } - protected function tearDown() { + protected function tearDown(): void { \unlink($this->configFile); parent::tearDown(); } diff --git a/tests/lib/ContactsManagerTest.php b/tests/lib/ContactsManagerTest.php index 42a006ecd250..4c5ec08e75dd 100644 --- a/tests/lib/ContactsManagerTest.php +++ b/tests/lib/ContactsManagerTest.php @@ -7,7 +7,7 @@ class ContactsManagerTest extends \Test\TestCase { /** @var \OC\ContactsManager */ private $cm; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->cm = new \OC\ContactsManager(); } diff --git a/tests/lib/DB/AdapterTest.php b/tests/lib/DB/AdapterTest.php index 0fe1cb58a9ad..6a4cc54f79e1 100644 --- a/tests/lib/DB/AdapterTest.php +++ b/tests/lib/DB/AdapterTest.php @@ -49,7 +49,7 @@ public function __construct() { parent::__construct(); } - public function tearDown() { + public function tearDown(): void { // remove columns from the appconfig table $qb = $this->conn->getQueryBuilder(); $qb->delete('*PREFIX*appconfig') diff --git a/tests/lib/DB/ConnectionTest.php b/tests/lib/DB/ConnectionTest.php index 68187a576c77..772533dd20f6 100644 --- a/tests/lib/DB/ConnectionTest.php +++ b/tests/lib/DB/ConnectionTest.php @@ -32,7 +32,7 @@ public static function setUpBeforeClass() { parent::setUpBeforeClass(); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { self::dropTestTable(); parent::tearDownAfterClass(); } @@ -43,12 +43,12 @@ protected static function dropTestTable() { } } - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); $this->connection->dropTable('table'); } diff --git a/tests/lib/DB/DBSchemaTest.php b/tests/lib/DB/DBSchemaTest.php index 55fb5e5e7f9d..d35419a2bdd0 100644 --- a/tests/lib/DB/DBSchemaTest.php +++ b/tests/lib/DB/DBSchemaTest.php @@ -24,7 +24,7 @@ class DBSchemaTest extends TestCase { protected $table1; protected $table2; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $dbfile = \OC::$SERVERROOT.'/tests/data/db_structure.xml'; @@ -43,7 +43,7 @@ protected function setUp() { $this->table2 = $r.'cntcts_cards'; } - protected function tearDown() { + protected function tearDown(): void { \unlink($this->schema_file); \unlink($this->schema_file2); diff --git a/tests/lib/DB/LegacyDBTest.php b/tests/lib/DB/LegacyDBTest.php index b1fa1ea2744c..85a7bc31f4ae 100644 --- a/tests/lib/DB/LegacyDBTest.php +++ b/tests/lib/DB/LegacyDBTest.php @@ -51,7 +51,7 @@ class LegacyDBTest extends \Test\TestCase { */ private $text_table; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $dbFile = \OC::$SERVERROOT.'/tests/data/db_structure.xml'; @@ -71,7 +71,7 @@ protected function setUp() { $this->text_table = $this->test_prefix.'text_table'; } - protected function tearDown() { + protected function tearDown(): void { OC_DB::removeDBStructure(self::$schema_file); \unlink(self::$schema_file); diff --git a/tests/lib/DB/MDB2SchemaManagerTest.php b/tests/lib/DB/MDB2SchemaManagerTest.php index 0079b50021de..80de55859353 100644 --- a/tests/lib/DB/MDB2SchemaManagerTest.php +++ b/tests/lib/DB/MDB2SchemaManagerTest.php @@ -19,7 +19,7 @@ * @package Test\DB */ class MDB2SchemaManagerTest extends \Test\TestCase { - protected function tearDown() { + protected function tearDown(): void { // do not drop the table for Oracle as it will create a bogus transaction // that will break the following test suites requiring transactions if (\OC::$server->getConfig()->getSystemValue('dbtype', 'sqlite') !== 'oci') { diff --git a/tests/lib/DB/MigrationsTest.php b/tests/lib/DB/MigrationsTest.php index 9c2748bbad23..ea0dfbfaa3ed 100644 --- a/tests/lib/DB/MigrationsTest.php +++ b/tests/lib/DB/MigrationsTest.php @@ -28,7 +28,7 @@ class MigrationsTest extends \Test\TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject | IDBConnection $db */ private $db; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->db = $this->createMock(Connection::class); diff --git a/tests/lib/DB/MigratorTest.php b/tests/lib/DB/MigratorTest.php index 9cd647564e60..0814f71d3cd1 100644 --- a/tests/lib/DB/MigratorTest.php +++ b/tests/lib/DB/MigratorTest.php @@ -44,7 +44,7 @@ class MigratorTest extends \Test\TestCase { /** @var string */ private $tableNameTmp; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = \OC::$server->getConfig(); @@ -58,7 +58,7 @@ private function getUniqueTableName() { return \strtolower(self::getUniqueID($this->config->getSystemValue('dbtableprefix', 'oc_') . 'test_')); } - protected function tearDown() { + protected function tearDown(): void { // Try to delete if exists (IF EXISTS NOT SUPPORTED IN ORACLE) try { $this->connection->exec('DROP TABLE ' . $this->connection->quoteIdentifier($this->tableNameTmp)); diff --git a/tests/lib/DB/MySqlMigrationTest.php b/tests/lib/DB/MySqlMigrationTest.php index 9687a1052f84..73d5829780e6 100644 --- a/tests/lib/DB/MySqlMigrationTest.php +++ b/tests/lib/DB/MySqlMigrationTest.php @@ -21,7 +21,7 @@ class MySqlMigrationTest extends \Test\TestCase { /** @var string */ private $tableName; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -34,7 +34,7 @@ protected function setUp() { $this->connection->exec("CREATE TABLE $this->tableName(b BIT, e ENUM('1','2','3','4'))"); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->getSchemaManager()->dropTable($this->tableName); parent::tearDown(); } diff --git a/tests/lib/DB/MySqlToolsTest.php b/tests/lib/DB/MySqlToolsTest.php index c626f3590f1e..51591443a9cd 100644 --- a/tests/lib/DB/MySqlToolsTest.php +++ b/tests/lib/DB/MySqlToolsTest.php @@ -42,7 +42,7 @@ class MySqlToolsTest extends \Test\TestCase { * @var MySqlTools */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->db = $this->createMock(Connection::class); diff --git a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php index 80957361d331..b719684df5b5 100644 --- a/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/ExpressionBuilderTest.php @@ -43,7 +43,7 @@ class ExpressionBuilderTest extends TestCase { /** @var \Doctrine\DBAL\Connection|\OCP\IDBConnection */ protected $connection; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); diff --git a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php index 7938e8c98222..5640053ccd73 100644 --- a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php @@ -41,7 +41,7 @@ class QueryBuilderTest extends \Test\TestCase { /** @var IDBConnection */ protected $connection; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); diff --git a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php index 1777cea8762f..98ea8b58e4bb 100644 --- a/tests/lib/DB/QueryBuilder/QuoteHelperTest.php +++ b/tests/lib/DB/QueryBuilder/QuoteHelperTest.php @@ -31,7 +31,7 @@ class QuoteHelperTest extends \Test\TestCase { /** @var QuoteHelper */ protected $helper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->helper = new QuoteHelper(); diff --git a/tests/lib/DB/SchemaDiffTest.php b/tests/lib/DB/SchemaDiffTest.php index 9b6a7699f64a..2826bc7236a0 100644 --- a/tests/lib/DB/SchemaDiffTest.php +++ b/tests/lib/DB/SchemaDiffTest.php @@ -48,7 +48,7 @@ class SchemaDiffTest extends TestCase { /** @var string */ private $testPrefix; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = \OC::$server->getConfig(); @@ -57,7 +57,7 @@ protected function setUp() { $this->testPrefix= \strtolower($this->getUniqueID($this->config->getSystemValue('dbtableprefix', 'oc_'), 3)); } - protected function tearDown() { + protected function tearDown(): void { $this->manager->removeDBStructure('static://test_db_scheme'); parent::tearDown(); } diff --git a/tests/lib/DB/SqliteMigrationTest.php b/tests/lib/DB/SqliteMigrationTest.php index cbea5c3418eb..1c383c33a8ee 100644 --- a/tests/lib/DB/SqliteMigrationTest.php +++ b/tests/lib/DB/SqliteMigrationTest.php @@ -21,7 +21,7 @@ class SqliteMigrationTest extends \Test\TestCase { /** @var string */ private $tableName; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -34,7 +34,7 @@ protected function setUp() { $this->connection->exec("CREATE TABLE $this->tableName(t0 tinyint unsigned, t1 tinyint)"); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->getSchemaManager()->dropTable($this->tableName); parent::tearDown(); } diff --git a/tests/lib/DateTimeFormatterTest.php b/tests/lib/DateTimeFormatterTest.php index 38ff89e41908..169413bdc8e0 100644 --- a/tests/lib/DateTimeFormatterTest.php +++ b/tests/lib/DateTimeFormatterTest.php @@ -27,12 +27,12 @@ public static function setUpBeforeClass() { self::$oneYear = self::$oneDay * 365; } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { \date_default_timezone_set(self::$defaultTimeZone); parent::tearDownAfterClass(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->formatter = new \OC\DateTimeFormatter(new \DateTimeZone('UTC'), \OC::$server->getL10NFactory()->get('lib', 'en')); } diff --git a/tests/lib/Diagnostics/EventLoggerTest.php b/tests/lib/Diagnostics/EventLoggerTest.php index b7f0b8344a79..a130c1842336 100644 --- a/tests/lib/Diagnostics/EventLoggerTest.php +++ b/tests/lib/Diagnostics/EventLoggerTest.php @@ -29,7 +29,7 @@ class EventLoggerTest extends TestCase { /** @var \OC\Diagnostics\EventLogger */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = new EventLogger(); diff --git a/tests/lib/Diagnostics/QueryLoggerTest.php b/tests/lib/Diagnostics/QueryLoggerTest.php index 643f838e66db..fc492ccec59d 100644 --- a/tests/lib/Diagnostics/QueryLoggerTest.php +++ b/tests/lib/Diagnostics/QueryLoggerTest.php @@ -29,7 +29,7 @@ class QueryLoggerTest extends TestCase { /** @var \OC\Diagnostics\QueryLogger */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = new QueryLogger(); diff --git a/tests/lib/Encryption/DecryptAllTest.php b/tests/lib/Encryption/DecryptAllTest.php index c26d007b4e93..59fed899b1ba 100644 --- a/tests/lib/Encryption/DecryptAllTest.php +++ b/tests/lib/Encryption/DecryptAllTest.php @@ -84,7 +84,7 @@ class DecryptAllTest extends TestCase { /** @var DecryptAll */ protected $instance; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->userManager = $this->getMockBuilder(IUserManager::class) diff --git a/tests/lib/Encryption/EncryptionWrapperTest.php b/tests/lib/Encryption/EncryptionWrapperTest.php index fd76d1df2a39..1204cb9f0ad4 100644 --- a/tests/lib/Encryption/EncryptionWrapperTest.php +++ b/tests/lib/Encryption/EncryptionWrapperTest.php @@ -38,7 +38,7 @@ class EncryptionWrapperTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Memcache\ArrayCache */ private $arrayCache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->arrayCache = $this->createMock('OC\Memcache\ArrayCache'); diff --git a/tests/lib/Encryption/Keys/StorageTest.php b/tests/lib/Encryption/Keys/StorageTest.php index 571dd882528d..3cdde407759a 100644 --- a/tests/lib/Encryption/Keys/StorageTest.php +++ b/tests/lib/Encryption/Keys/StorageTest.php @@ -53,7 +53,7 @@ class StorageTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ protected $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->util = $this->getMockBuilder('OC\Encryption\Util') @@ -81,7 +81,7 @@ public function setUp() { $this->storage = new Storage($this->view, $this->util, $userSession); } - public function tearDown() { + public function tearDown(): void { \OC\Files\Filesystem::tearDown(); parent::tearDown(); } diff --git a/tests/lib/Encryption/ManagerTest.php b/tests/lib/Encryption/ManagerTest.php index 28d14c7f0e5a..c77bfd50b8ed 100644 --- a/tests/lib/Encryption/ManagerTest.php +++ b/tests/lib/Encryption/ManagerTest.php @@ -28,7 +28,7 @@ class ManagerTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Memcache\ArrayCache */ private $arrayCache; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock('\OCP\IConfig'); $this->logger = $this->createMock('\OCP\ILogger'); diff --git a/tests/lib/Encryption/UpdateTest.php b/tests/lib/Encryption/UpdateTest.php index 64bccc12ab27..412e0a41af0e 100644 --- a/tests/lib/Encryption/UpdateTest.php +++ b/tests/lib/Encryption/UpdateTest.php @@ -50,7 +50,7 @@ class UpdateTest extends TestCase { /** @var \OC\Encryption\File | \PHPUnit\Framework\MockObject\MockObject */ private $fileHelper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->view = $this->getMockBuilder('\OC\Files\View') diff --git a/tests/lib/Encryption/UtilTest.php b/tests/lib/Encryption/UtilTest.php index c67ebfa587da..73adb6621e2d 100644 --- a/tests/lib/Encryption/UtilTest.php +++ b/tests/lib/Encryption/UtilTest.php @@ -29,7 +29,7 @@ class UtilTest extends TestCase { /** @var \OC\Encryption\Util */ private $util; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->view = $this->getMockBuilder('OC\Files\View') ->disableOriginalConstructor() diff --git a/tests/lib/Events/EventEmitterTraitTest.php b/tests/lib/Events/EventEmitterTraitTest.php index e8cce5668a05..8c96ddacaf56 100644 --- a/tests/lib/Events/EventEmitterTraitTest.php +++ b/tests/lib/Events/EventEmitterTraitTest.php @@ -20,8 +20,8 @@ */ class EventEmitterTraitTest extends TestCase { use EventEmitterTrait; - protected function setUp() { - return parent::setUp(); + protected function setUp(): void { + parent::setUp(); } public function dummyFunction() { diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php index 22b40cf696a8..6314d23e4990 100644 --- a/tests/lib/Files/Cache/CacheTest.php +++ b/tests/lib/Files/Cache/CacheTest.php @@ -684,7 +684,7 @@ public function testUpdateClearsCacheColumn() { $this->assertEmpty($entry['checksum']); } - protected function tearDown() { + protected function tearDown(): void { if ($this->cache) { $this->cache->clear(); } @@ -692,7 +692,7 @@ protected function tearDown() { parent::tearDown(); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = new Temporary([]); diff --git a/tests/lib/Files/Cache/HomeCacheTest.php b/tests/lib/Files/Cache/HomeCacheTest.php index d93abc766735..3b94eb1557b3 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 7f5d34a922eb..6e1430d146bd 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([]); diff --git a/tests/lib/Files/Cache/PropagatorTest.php b/tests/lib/Files/Cache/PropagatorTest.php index 95870ab8cdec..97a40512fc9c 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/ScannerTest.php b/tests/lib/Files/Cache/ScannerTest.php index 30301d41c367..4ad8f8cf3e49 100644 --- a/tests/lib/Files/Cache/ScannerTest.php +++ b/tests/lib/Files/Cache/ScannerTest.php @@ -37,7 +37,7 @@ class ScannerTest extends \Test\TestCase { */ private $cache; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = new \OC\Files\Storage\Temporary([]); @@ -45,7 +45,7 @@ protected function setUp() { $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 7bc71d7f49f7..9938438b1d86 100644 --- a/tests/lib/Files/Cache/UpdaterLegacyTest.php +++ b/tests/lib/Files/Cache/UpdaterLegacyTest.php @@ -36,7 +36,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([]); @@ -67,7 +67,7 @@ protected function setUp() { \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 907c968bd1bb..4c99b24d9d6c 100644 --- a/tests/lib/Files/Cache/UpdaterTest.php +++ b/tests/lib/Files/Cache/UpdaterTest.php @@ -39,7 +39,7 @@ class UpdaterTest extends \Test\TestCase { */ protected $updater; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->loginAsUser(); @@ -49,7 +49,7 @@ protected function setUp() { $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 98ab391c59e5..1f35bd57aa52 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 = []; - 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 00e7e07fbaec..4eccd0baa88a 100644 --- a/tests/lib/Files/Cache/Wrapper/CacheJailTest.php +++ b/tests/lib/Files/Cache/Wrapper/CacheJailTest.php @@ -23,7 +23,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 ab0db9cfc393..959d556ba88f 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 a7587c4a5016..5a4a90336993 100644 --- a/tests/lib/Files/Config/UserMountCacheTest.php +++ b/tests/lib/Files/Config/UserMountCacheTest.php @@ -48,7 +48,7 @@ class UserMountCacheTest extends TestCase { private $fileIds = []; - public function setUp() { + public function setUp(): void { $this->fileIds = []; $this->connection = \OC::$server->getDatabaseConnection(); $this->userSearch = $this->getMockBuilder(\OCP\Util\UserSearch::class) @@ -89,7 +89,7 @@ public function setUp() { $this->userManager->listen('\OC\User', 'postDelete', [$this->cache, 'removeUserMounts']); } - 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 57738feb80ca..f4d8a9e398c5 100644 --- a/tests/lib/Files/EtagTest.php +++ b/tests/lib/Files/EtagTest.php @@ -26,7 +26,7 @@ class EtagTest extends \Test\TestCase { private $tmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_Hook::clear('OC_Filesystem', 'setup'); @@ -41,7 +41,7 @@ protected function setUp() { $config->setSystemValue('datadirectory', $this->tmpDir); } - protected function tearDown() { + protected function tearDown(): void { \OC::$server->getConfig()->setSystemValue('datadirectory', $this->datadir); $this->logout(); diff --git a/tests/lib/Files/External/Auth/Password/SessionCredentialsTest.php b/tests/lib/Files/External/Auth/Password/SessionCredentialsTest.php index 2e35f70248e9..650d5fd74a1a 100644 --- a/tests/lib/Files/External/Auth/Password/SessionCredentialsTest.php +++ b/tests/lib/Files/External/Auth/Password/SessionCredentialsTest.php @@ -38,7 +38,7 @@ class SessionCredentialsTest extends \Test\TestCase { /** @var ICrypto | \PHPUnit\Framework\MockObject\MockObject */ private $crypto; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->session = $this->createMock(ISession::class); $this->crypto = $this->createMock(ICrypto::class); @@ -48,7 +48,7 @@ public function setUp() { ); } - public function tearDown() { + public function tearDown(): void { \OC_Hook::clear('OC_User', 'post_login'); parent::tearDown(); } diff --git a/tests/lib/Files/External/ConfigAdapterTest.php b/tests/lib/Files/External/ConfigAdapterTest.php index 8006cab83013..fc3fc50ea213 100644 --- a/tests/lib/Files/External/ConfigAdapterTest.php +++ b/tests/lib/Files/External/ConfigAdapterTest.php @@ -54,7 +54,7 @@ class ConfigAdapterTest extends \Test\TestCase { /** @var int */ private $configId; - protected function setUp() { + protected function setUp(): void { $this->config = $this->createMock(IConfig::class); $this->userStoragesService = $this->createMock(UserStoragesService::class); $this->userGlobalStoragesService = $this->createMock(UserGlobalStoragesService::class); diff --git a/tests/lib/Files/External/Service/DBConfigServiceTest.php b/tests/lib/Files/External/Service/DBConfigServiceTest.php index 4408b2c3ab6d..96888e04531a 100644 --- a/tests/lib/Files/External/Service/DBConfigServiceTest.php +++ b/tests/lib/Files/External/Service/DBConfigServiceTest.php @@ -42,13 +42,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/tests/lib/Files/External/Service/GlobalStoragesServiceDeleteUserTest.php b/tests/lib/Files/External/Service/GlobalStoragesServiceDeleteUserTest.php index 89c6912a708d..edbe59f5c641 100644 --- a/tests/lib/Files/External/Service/GlobalStoragesServiceDeleteUserTest.php +++ b/tests/lib/Files/External/Service/GlobalStoragesServiceDeleteUserTest.php @@ -35,11 +35,11 @@ * @package Test\Files\External\Service */ class GlobalStoragesServiceDeleteUserTest extends TestCase { - public function setUp() { + public function setUp(): void { parent::setUp(); } - public function tearDown() { + public function tearDown(): void { parent::tearDown(); //Remove all global storages created diff --git a/tests/lib/Files/External/Service/GlobalStoragesServiceTest.php b/tests/lib/Files/External/Service/GlobalStoragesServiceTest.php index 43720082648e..b4f3aacb5235 100644 --- a/tests/lib/Files/External/Service/GlobalStoragesServiceTest.php +++ b/tests/lib/Files/External/Service/GlobalStoragesServiceTest.php @@ -31,12 +31,12 @@ * @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/tests/lib/Files/External/Service/StoragesServiceTest.php b/tests/lib/Files/External/Service/StoragesServiceTest.php index 4df1bfe75c04..907fd333e128 100644 --- a/tests/lib/Files/External/Service/StoragesServiceTest.php +++ b/tests/lib/Files/External/Service/StoragesServiceTest.php @@ -74,7 +74,7 @@ abstract class StoragesServiceTest extends TestCase { */ protected $backends; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->dbConfig = new CleaningDBConfig(\OC::$server->getDatabaseConnection(), \OC::$server->getCrypto()); self::$hookCalls = []; @@ -152,7 +152,7 @@ public function setUp() { })); } - public function tearDown() { + public function tearDown(): void { self::$hookCalls = []; if ($this->dbConfig) { $this->dbConfig->clean(); diff --git a/tests/lib/Files/External/Service/UserGlobalStoragesServiceTest.php b/tests/lib/Files/External/Service/UserGlobalStoragesServiceTest.php index 5ad8f1686322..3c3258ed354c 100644 --- a/tests/lib/Files/External/Service/UserGlobalStoragesServiceTest.php +++ b/tests/lib/Files/External/Service/UserGlobalStoragesServiceTest.php @@ -56,7 +56,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/tests/lib/Files/External/Service/UserStoragesServiceTest.php b/tests/lib/Files/External/Service/UserStoragesServiceTest.php index d6ad5e11659a..03c16f49c3e5 100644 --- a/tests/lib/Files/External/Service/UserStoragesServiceTest.php +++ b/tests/lib/Files/External/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/tests/lib/Files/External/StoragesBackendServiceTest.php b/tests/lib/Files/External/StoragesBackendServiceTest.php index b1765d858eb6..087f454e1e3f 100644 --- a/tests/lib/Files/External/StoragesBackendServiceTest.php +++ b/tests/lib/Files/External/StoragesBackendServiceTest.php @@ -28,7 +28,7 @@ class StoragesBackendServiceTest extends \Test\TestCase { /** @var \OCP\IConfig */ protected $config; - protected function setUp() { + protected function setUp(): void { $this->config = $this->createMock('\OCP\IConfig'); } diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php index ca22344d071f..8adf1140708c 100644 --- a/tests/lib/Files/FilesystemTest.php +++ b/tests/lib/Files/FilesystemTest.php @@ -82,14 +82,14 @@ private function getStorageData() { return ['datadir' => $dir]; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->createUser(self::TEST_FILESYSTEM_USER1, self::TEST_FILESYSTEM_USER1); $this->createUser(self::TEST_FILESYSTEM_USER2, self::TEST_FILESYSTEM_USER2); $this->loginAsUser(); } - protected function tearDown() { + protected function tearDown(): void { foreach ($this->tmpDirs as $dir) { \OC_Helper::rmdirr($dir); } diff --git a/tests/lib/Files/MetaFilesTest.php b/tests/lib/Files/MetaFilesTest.php index 9db1638234dd..c65b57f87149 100644 --- a/tests/lib/Files/MetaFilesTest.php +++ b/tests/lib/Files/MetaFilesTest.php @@ -48,7 +48,7 @@ class MetaFilesTest extends TestCase { */ private $userId; - protected function setUp() { + protected function setUp(): void { parent::setUp(); // workaround: re-setup versions hooks @@ -59,7 +59,7 @@ protected function setUp() { $this->loginAsUser($this->userId); } - protected function tearDown() { + protected function tearDown(): void { self::logout(); parent::tearDown(); } diff --git a/tests/lib/Files/MetaVersionCollectionTest.php b/tests/lib/Files/MetaVersionCollectionTest.php index 0b9b827f4b17..8df8b3696381 100644 --- a/tests/lib/Files/MetaVersionCollectionTest.php +++ b/tests/lib/Files/MetaVersionCollectionTest.php @@ -57,7 +57,7 @@ class MetaVersionCollectionTest extends TestCase { */ private $storage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->rootFolder = $this->createMock(IRootFolder::class); @@ -67,7 +67,7 @@ protected function setUp() { $this->collection = new MetaVersionCollection($this->rootFolder, $this->node); } - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); } diff --git a/tests/lib/Files/Mount/CacheMountProviderTest.php b/tests/lib/Files/Mount/CacheMountProviderTest.php index e3eb2c728b7f..7b5d988ce637 100644 --- a/tests/lib/Files/Mount/CacheMountProviderTest.php +++ b/tests/lib/Files/Mount/CacheMountProviderTest.php @@ -41,7 +41,7 @@ class CacheMountProviderTest 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/Mount/ManagerTest.php b/tests/lib/Files/Mount/ManagerTest.php index 77a0c67d1ac7..1c579c24d3c2 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 9e60e5456e0c..316c95dd6690 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('OCP\IConfig'); diff --git a/tests/lib/Files/Mount/PreviewsMountProviderTest.php b/tests/lib/Files/Mount/PreviewsMountProviderTest.php index aaf074b646d7..9788598cea64 100644 --- a/tests/lib/Files/Mount/PreviewsMountProviderTest.php +++ b/tests/lib/Files/Mount/PreviewsMountProviderTest.php @@ -41,7 +41,7 @@ class PreviewsMountProviderTest 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 7245dd375935..886cf98e1a94 100644 --- a/tests/lib/Files/Node/HookConnectorTest.php +++ b/tests/lib/Files/Node/HookConnectorTest.php @@ -43,7 +43,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'); @@ -53,7 +53,7 @@ public function setUp() { $this->root = new Root(Filesystem::getMountManager(), $this->view, \OC::$server->getUserManager()->get($this->userId)); } - 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 da73e96ffe72..d2209ebdd4de 100644 --- a/tests/lib/Files/Node/IntegrationTest.php +++ b/tests/lib/Files/Node/IntegrationTest.php @@ -40,7 +40,7 @@ class IntegrationTest extends TestCase { */ private $view; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $manager = Filesystem::getMountManager(); @@ -60,7 +60,7 @@ protected function setUp() { $this->root->mount($subStorage, '/substorage/'); } - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); 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 046da149136d..53e349c4a94c 100644 --- a/tests/lib/Files/Node/NodeTest.php +++ b/tests/lib/Files/Node/NodeTest.php @@ -23,7 +23,7 @@ abstract class NodeTest extends TestCase { protected $viewDeleteMethod = 'unlink'; protected $user; - 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 340ad875ff05..d92616d7b9b8 100644 --- a/tests/lib/Files/Node/RootTest.php +++ b/tests/lib/Files/Node/RootTest.php @@ -22,7 +22,7 @@ class RootTest extends TestCase { private $user; - 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 e496a999da87..fbca38b2a785 100644 --- a/tests/lib/Files/ObjectStore/NoopScannerTest.php +++ b/tests/lib/Files/ObjectStore/NoopScannerTest.php @@ -18,7 +18,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([]); diff --git a/tests/lib/Files/ObjectStore/ObjectStoreTest.php b/tests/lib/Files/ObjectStore/ObjectStoreTest.php index 291fc1894d3d..bb3b572789a9 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreTest.php @@ -48,7 +48,7 @@ class ObjectStoreTest extends TestCase { /** @var ObjectStoreStorage | \PHPUnit\Framework\MockObject\MockObject */ private $objectStore; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->impl = $this->createMock([IObjectStore::class, IVersionedObjectStorage::class]); $this->impl->expects($this->any()) diff --git a/tests/lib/Files/PathVerificationTest.php b/tests/lib/Files/PathVerificationTest.php index 6fa8b9041ba2..950a22b06855 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/Storage/CommonTest.php b/tests/lib/Files/Storage/CommonTest.php index 8f6595c28ce6..ac90de1fd996 100644 --- a/tests/lib/Files/Storage/CommonTest.php +++ b/tests/lib/Files/Storage/CommonTest.php @@ -34,14 +34,14 @@ class CommonTest extends Storage { * @var string tmpDir */ 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 6bee7d0788c4..53f0f83aa8b7 100644 --- a/tests/lib/Files/Storage/CopyDirectoryTest.php +++ b/tests/lib/Files/Storage/CopyDirectoryTest.php @@ -44,7 +44,7 @@ class CopyDirectoryStorage extends StorageNoRecursiveCopy { * @package Test\Files\Storage */ class CopyDirectoryTest extends Storage { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = new CopyDirectoryStorage([]); } diff --git a/tests/lib/Files/Storage/DavTest.php b/tests/lib/Files/Storage/DavTest.php index 9cbfccfe54b4..998b95fdaa21 100644 --- a/tests/lib/Files/Storage/DavTest.php +++ b/tests/lib/Files/Storage/DavTest.php @@ -84,7 +84,7 @@ class DavTest extends TestCase { */ private $cache; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->httpClientService = $this->createMock(IClientService::class); @@ -117,7 +117,7 @@ protected function setUp() { $this->instance->method('getCache')->willReturn($this->cache); } - protected function tearDown() { + protected function tearDown(): void { $this->restoreService('HttpClientService'); $this->restoreService('WebDavClientService'); $this->restoreService('TimeFactory'); diff --git a/tests/lib/Files/Storage/HomeTest.php b/tests/lib/Files/Storage/HomeTest.php index 29139ebf6ba1..9b163e84cbbb 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 @@ protected function setUp() { $this->instance = new \OC\Files\Storage\Home(['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 0dd3b48cd8f7..a9af8d261c9d 100644 --- a/tests/lib/Files/Storage/LocalTest.php +++ b/tests/lib/Files/Storage/LocalTest.php @@ -41,14 +41,14 @@ class LocalTest extends Storage { /** @var Local */ protected $instance; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); $this->instance = new \OC\Files\Storage\Local(['datadir' => $this->tmpDir]); } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->tmpDir); parent::tearDown(); } diff --git a/tests/lib/Files/Storage/LockingTests.php b/tests/lib/Files/Storage/LockingTests.php index 8c43ae2bad70..9be4424c627f 100644 --- a/tests/lib/Files/Storage/LockingTests.php +++ b/tests/lib/Files/Storage/LockingTests.php @@ -40,7 +40,7 @@ class LockingTests extends TestCase { /** @var int */ private $fileId; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $user = $this->createUser('locking-user'); @@ -55,7 +55,7 @@ protected function setUp() { list($this->storage, ) = $this->view->resolvePath('foo/bar.txt'); } - protected function tearDown() { + protected function tearDown(): void { if ($this->storage) { $this->storage->unlockNodePersistent('files/foo/bar.txt', [ 'token' => '123-456-789' diff --git a/tests/lib/Files/Storage/NodeTest.php b/tests/lib/Files/Storage/NodeTest.php index ca176e905572..0fddbc7c6178 100644 --- a/tests/lib/Files/Storage/NodeTest.php +++ b/tests/lib/Files/Storage/NodeTest.php @@ -39,7 +39,7 @@ abstract class NodeTest extends TestCase { */ protected $storage; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->storage = $this->createMock(IStorage::class); $this->storage->expects($this->any()) diff --git a/tests/lib/Files/Storage/Wrapper/ChecksumTest.php b/tests/lib/Files/Storage/Wrapper/ChecksumTest.php index 8be0ff08bd19..85e758d97db2 100644 --- a/tests/lib/Files/Storage/Wrapper/ChecksumTest.php +++ b/tests/lib/Files/Storage/Wrapper/ChecksumTest.php @@ -41,7 +41,7 @@ class ChecksumTest extends \Test\TestCase { const TEST_DATA = 'somedata'; const EXPECTED_CHECKSUMS = 'SHA1:efaa311ae448a7374c122061bfed952d940e9e37 MD5:aefaf7502d52994c3b01957636a3cdd2 ADLER32:0f2c034f'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sourceStorage = new \OC\Files\Storage\Temporary([]); $this->instance = new \OC\Files\Storage\Wrapper\Checksum([ diff --git a/tests/lib/Files/Storage/Wrapper/DirMaskTest.php b/tests/lib/Files/Storage/Wrapper/DirMaskTest.php index 1ee57cb0d9a4..4d5e527a3fed 100644 --- a/tests/lib/Files/Storage/Wrapper/DirMaskTest.php +++ b/tests/lib/Files/Storage/Wrapper/DirMaskTest.php @@ -49,7 +49,7 @@ private function getStorage($mask) { ); } - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sourceStorage = new Temporary([]); } diff --git a/tests/lib/Files/Storage/Wrapper/EncodingTest.php b/tests/lib/Files/Storage/Wrapper/EncodingTest.php index 3f138693fc64..fc8503f3dc34 100644 --- a/tests/lib/Files/Storage/Wrapper/EncodingTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncodingTest.php @@ -17,7 +17,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([ @@ -25,7 +25,7 @@ public function setUp() { ]); } - 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 67bdd472fb1c..a9ec4ccda268 100644 --- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php +++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php @@ -93,7 +93,7 @@ class EncryptionTest extends Storage { /** @var integer dummy unencrypted size */ private $dummySize = -1; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $mockModule = $this->buildMockModule(); diff --git a/tests/lib/Files/Storage/Wrapper/JailTest.php b/tests/lib/Files/Storage/Wrapper/JailTest.php index 1b8f708155a5..d1cca4db1529 100644 --- a/tests/lib/Files/Storage/Wrapper/JailTest.php +++ b/tests/lib/Files/Storage/Wrapper/JailTest.php @@ -18,7 +18,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([]); $this->sourceStorage->mkdir('foo'); @@ -28,7 +28,7 @@ public function setUp() { ]); } - public function tearDown() { + public function tearDown(): void { // test that nothing outside our jail is touched $contents = []; $dh = $this->sourceStorage->opendir(''); diff --git a/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php b/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php index ea2724a8f0b5..ae409cc88f69 100644 --- a/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php +++ b/tests/lib/Files/Storage/Wrapper/PermissionsMaskTest.php @@ -17,13 +17,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([]); $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 2efb329a4b27..e9bd4252fc05 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 @@ protected function setUp() { $this->instance = new \OC\Files\Storage\Wrapper\Quota(['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/ReadOnlyJailTest.php b/tests/lib/Files/Storage/Wrapper/ReadOnlyJailTest.php index 686c3d135d0a..defd689e3a74 100644 --- a/tests/lib/Files/Storage/Wrapper/ReadOnlyJailTest.php +++ b/tests/lib/Files/Storage/Wrapper/ReadOnlyJailTest.php @@ -14,7 +14,7 @@ class ReadOnlyJailTest extends TestCase { /** @var Temporary */ private $sourceStorage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->sourceStorage = new Temporary([]); diff --git a/tests/lib/Files/Storage/Wrapper/WrapperTest.php b/tests/lib/Files/Storage/Wrapper/WrapperTest.php index eaf827a0f88f..09153e822765 100644 --- a/tests/lib/Files/Storage/Wrapper/WrapperTest.php +++ b/tests/lib/Files/Storage/Wrapper/WrapperTest.php @@ -23,7 +23,7 @@ class WrapperTest extends Storage { */ private $tmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -31,7 +31,7 @@ protected function setUp() { $this->instance = new Wrapper(['storage' => $storage]); } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->tmpDir); parent::tearDown(); } diff --git a/tests/lib/Files/Stream/QuotaTest.php b/tests/lib/Files/Stream/QuotaTest.php index 7d34e5d9378d..a9b41db11155 100644 --- a/tests/lib/Files/Stream/QuotaTest.php +++ b/tests/lib/Files/Stream/QuotaTest.php @@ -9,7 +9,7 @@ namespace Test\Files\Stream; class QuotaTest extends \Test\TestCase { - protected function tearDown() { + protected function tearDown(): void { \OC\Files\Stream\Quota::clear(); parent::tearDown(); } diff --git a/tests/lib/Files/Stream/StaticStreamTest.php b/tests/lib/Files/Stream/StaticStreamTest.php index e9156da085c5..32e460b128fd 100644 --- a/tests/lib/Files/Stream/StaticStreamTest.php +++ b/tests/lib/Files/Stream/StaticStreamTest.php @@ -12,13 +12,13 @@ class StaticStreamTest extends \Test\TestCase { private $sourceFile; private $sourceText; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->sourceFile = \OC::$SERVERROOT . '/tests/data/lorem.txt'; $this->sourceText = \file_get_contents($this->sourceFile); } - protected function tearDown() { + protected function tearDown(): void { \OC\Files\Stream\StaticStream::clear(); parent::tearDown(); } diff --git a/tests/lib/Files/Type/DetectionTest.php b/tests/lib/Files/Type/DetectionTest.php index 8938f4ada02e..8dcd0f0d2c5d 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 c6ce22244250..dbe849913e44 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 8706a84ad795..e8cfc39c47c2 100644 --- a/tests/lib/Files/Utils/ScannerTest.php +++ b/tests/lib/Files/Utils/ScannerTest.php @@ -46,13 +46,13 @@ protected function getMounts($dir) { class ScannerTest extends \Test\TestCase { use UserTrait; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->loginAsUser(); } - protected function tearDown() { + protected function tearDown(): void { $this->logout(); parent::tearDown(); } diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index c526fa6fafd0..6d505b070c4e 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -84,7 +84,7 @@ class ViewTest extends TestCase { /** @var \OC\AllConfig */ private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_Hook::clear(); @@ -112,7 +112,7 @@ protected function setUp() { $this->config = $this->createMock(AllConfig::class); } - protected function tearDown() { + protected function tearDown(): void { $this->restoreService('AllConfig'); \OC_User::setUserId($this->user); foreach ($this->storages as $storage) { diff --git a/tests/lib/Group/DatabaseTest.php b/tests/lib/Group/DatabaseTest.php index b04efe6ee5b6..b582211ba650 100644 --- a/tests/lib/Group/DatabaseTest.php +++ b/tests/lib/Group/DatabaseTest.php @@ -45,12 +45,12 @@ public function getGroupName($name = null) { return $name; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->backend = new \OC\Group\Database(); } - protected function tearDown() { + protected function tearDown(): void { foreach ($this->groups as $group) { $this->backend->deleteGroup($group); } diff --git a/tests/lib/Group/Dummy.php b/tests/lib/Group/Dummy.php index 830e33220727..66a8cdb84a9c 100644 --- a/tests/lib/Group/Dummy.php +++ b/tests/lib/Group/Dummy.php @@ -28,7 +28,7 @@ * @group DB */ class Dummy extends Backend { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->backend=new \Test\Util\Group\Dummy(); } diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php index bb715eef15ba..f33333111af2 100644 --- a/tests/lib/Group/ManagerTest.php +++ b/tests/lib/Group/ManagerTest.php @@ -49,7 +49,7 @@ class ManagerTest extends \Test\TestCase { /** @var \OC\Group\Manager */ protected $manager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->userSearch = $this->getMockBuilder(UserSearch::class) ->disableOriginalConstructor() diff --git a/tests/lib/Group/MetaDataTest.php b/tests/lib/Group/MetaDataTest.php index a8e31b244ded..3f5f6e41f798 100644 --- a/tests/lib/Group/MetaDataTest.php +++ b/tests/lib/Group/MetaDataTest.php @@ -32,7 +32,7 @@ class MetaDataTest extends \Test\TestCase { /** @var bool */ private $isAdmin = true; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->groupManager = $this->getMockBuilder('\OC\Group\Manager') ->disableOriginalConstructor() diff --git a/tests/lib/HTTPHelperTest.php b/tests/lib/HTTPHelperTest.php index b430478cc162..aa2beb312244 100644 --- a/tests/lib/HTTPHelperTest.php +++ b/tests/lib/HTTPHelperTest.php @@ -17,7 +17,7 @@ class HTTPHelperTest extends \Test\TestCase { /** @var \OCP\Http\Client\IClientService */ private $clientService; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder('\OCP\IConfig') diff --git a/tests/lib/Helper/EnvironmentHelperTest.php b/tests/lib/Helper/EnvironmentHelperTest.php index b20dc0e07216..7380673c8c30 100644 --- a/tests/lib/Helper/EnvironmentHelperTest.php +++ b/tests/lib/Helper/EnvironmentHelperTest.php @@ -27,7 +27,7 @@ class EnvironmentHelperTest extends TestCase { private $environmentHelper; - public function setUp() { + public function setUp(): void { $this->environmentHelper = new EnvironmentHelper(); parent::setUp(); } diff --git a/tests/lib/Helper/LocaleHelperTest.php b/tests/lib/Helper/LocaleHelperTest.php index 8ac067d6e70f..1e0d89c8eef1 100644 --- a/tests/lib/Helper/LocaleHelperTest.php +++ b/tests/lib/Helper/LocaleHelperTest.php @@ -37,7 +37,7 @@ class LocaleHelperTest extends TestCase { */ protected $localeHelper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->localeHelper = new LocaleHelper(); } diff --git a/tests/lib/Helper/UserTypeHelperTest.php b/tests/lib/Helper/UserTypeHelperTest.php index 313d4c06fe54..0aad02fd30eb 100644 --- a/tests/lib/Helper/UserTypeHelperTest.php +++ b/tests/lib/Helper/UserTypeHelperTest.php @@ -37,7 +37,7 @@ class UserTypeHelperTest extends TestCase { /** @var UserTypeHelper | \PHPUnit\Framework\MockObject\MockObject */ protected $userTypeHelper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appManager = $this->createMock(IAppManager::class); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/HelperStorageTest.php b/tests/lib/HelperStorageTest.php index 1e931f7da465..fce4805747b0 100644 --- a/tests/lib/HelperStorageTest.php +++ b/tests/lib/HelperStorageTest.php @@ -26,7 +26,7 @@ class HelperStorageTest extends TestCase { /** @var IUser */ private $userObj; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->getUniqueID('user_'); @@ -41,7 +41,7 @@ protected function setUp() { $this->storageMock = null; } - protected function tearDown() { + protected function tearDown(): void { if ($this->storageMock) { $this->storageMock->getCache()->clear(); $this->storageMock = null; diff --git a/tests/lib/Hooks/BasicEmitterTest.php b/tests/lib/Hooks/BasicEmitterTest.php index 886fe4d52e5a..86fce1b241ef 100644 --- a/tests/lib/Hooks/BasicEmitterTest.php +++ b/tests/lib/Hooks/BasicEmitterTest.php @@ -37,7 +37,7 @@ class BasicEmitterTest extends \Test\TestCase { */ protected $emitter; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->emitter = new DummyEmitter(); } diff --git a/tests/lib/Hooks/LegacyEmitterTest.php b/tests/lib/Hooks/LegacyEmitterTest.php index ad69dde93693..8be901659926 100644 --- a/tests/lib/Hooks/LegacyEmitterTest.php +++ b/tests/lib/Hooks/LegacyEmitterTest.php @@ -26,7 +26,7 @@ class LegacyEmitterTest extends BasicEmitterTest { //we can't use exceptions here since OC_Hooks catches all exceptions private static $emitted = false; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->emitter = new DummyLegacyEmitter(); diff --git a/tests/lib/Http/Client/ClientTest.php b/tests/lib/Http/Client/ClientTest.php index 40f9418a6d31..26d5b5356df1 100644 --- a/tests/lib/Http/Client/ClientTest.php +++ b/tests/lib/Http/Client/ClientTest.php @@ -23,7 +23,7 @@ class ClientTest extends \Test\TestCase { /** @var IConfig */ private $config; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock('\OCP\IConfig'); $this->guzzleClient = $this->getMockBuilder('\GuzzleHttp\Client') diff --git a/tests/lib/Http/Client/ResponseTest.php b/tests/lib/Http/Client/ResponseTest.php index ba448a326bb0..5973a8e573bb 100644 --- a/tests/lib/Http/Client/ResponseTest.php +++ b/tests/lib/Http/Client/ResponseTest.php @@ -20,7 +20,7 @@ class ResponseTest extends \Test\TestCase { /** @var GuzzleResponse */ private $guzzleResponse; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->guzzleResponse = new GuzzleResponse(1337); $this->response = new Response($this->guzzleResponse); diff --git a/tests/lib/Http/Client/WebDavClientServiceTest.php b/tests/lib/Http/Client/WebDavClientServiceTest.php index f00800d987da..fb14196f2e9d 100644 --- a/tests/lib/Http/Client/WebDavClientServiceTest.php +++ b/tests/lib/Http/Client/WebDavClientServiceTest.php @@ -36,12 +36,12 @@ class WebDavClientServiceTest extends \Test\TestCase { */ private $tempManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->tempManager = \OC::$server->getTempManager(); } - public function tearDown() { + public function tearDown(): void { $this->tempManager->clean(); parent::tearDown(); } diff --git a/tests/lib/ImageTest.php b/tests/lib/ImageTest.php index 245128332ab1..9339a735cdee 100644 --- a/tests/lib/ImageTest.php +++ b/tests/lib/ImageTest.php @@ -11,7 +11,7 @@ use OC; class ImageTest extends \Test\TestCase { - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { @\unlink(OC::$SERVERROOT.'/tests/data/testimage2.png'); @\unlink(OC::$SERVERROOT.'/tests/data/testimage2.jpg'); diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php index ebaa4ec9e1fe..c173997ceb8b 100644 --- a/tests/lib/InstallerTest.php +++ b/tests/lib/InstallerTest.php @@ -13,14 +13,14 @@ class InstallerTest extends TestCase { private static $appid = 'testapp'; - protected function setUp() { + protected function setUp(): void { parent::setUp(); Installer::removeApp(self::$appid); \OC::$server->getConfig()->deleteAppValues(self::$appid); } - protected function tearDown() { + protected function tearDown(): void { Installer::removeApp(self::$appid); \OC::$server->getConfig()->deleteAppValues(self::$appid); parent::tearDown(); diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index a5604cad2f08..afbb88117a45 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -59,7 +59,7 @@ class CheckerTest extends TestCase { /** @var IAppManager | \PHPUnit\Framework\MockObject\MockObject */ private $appManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->environmentHelper = $this->createMock(EnvironmentHelper::class); $this->fileAccessHelper = $this->createMock(FileAccessHelper::class); diff --git a/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php b/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php index 7877c1718221..a1a3489c79d2 100644 --- a/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php +++ b/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php @@ -28,7 +28,7 @@ class AppLocatorTest extends TestCase { /** @var AppLocator */ private $locator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->locator = new AppLocator(); } diff --git a/tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php b/tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php index abf2421a6177..688c7d56fe77 100644 --- a/tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php +++ b/tests/lib/IntegrityCheck/Helpers/EnvironmentHelperTest.php @@ -28,9 +28,9 @@ class EnvironmentHelperTest extends TestCase { /** @var EnvironmentHelper */ private $environmentHelper; - public function setUp() { + public function setUp(): void { $this->environmentHelper = new EnvironmentHelper(); - return parent::setUp(); + parent::setUp(); } public function testGetServerRoot() { diff --git a/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php b/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php index 27c41d241d7b..5e48fc9764ca 100644 --- a/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php +++ b/tests/lib/IntegrityCheck/Helpers/FileAccessHelperTest.php @@ -27,7 +27,7 @@ class FileAccessHelperTest extends TestCase { /** @var FileAccessHelper */ private $fileAccessHelper; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->fileAccessHelper = new FileAccessHelper(); } diff --git a/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php b/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php index c440a1983ad6..b2dc17dfcefb 100644 --- a/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php +++ b/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php @@ -28,7 +28,7 @@ class ExcludeFileByNameFilterIteratorTest extends TestCase { /** @var \PHPUnit\Framework\MockObject\Mockbuilder */ protected $filter; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->filter = $this->getMockBuilder(ExcludeFileByNameFilterIterator::class) ->disableOriginalConstructor() diff --git a/tests/lib/L10N/FactoryTest.php b/tests/lib/L10N/FactoryTest.php index c00905b69fc9..63b1a3f600fe 100644 --- a/tests/lib/L10N/FactoryTest.php +++ b/tests/lib/L10N/FactoryTest.php @@ -35,7 +35,7 @@ class FactoryTest extends TestCase { /** @var string */ protected $serverRoot; - public function setUp() { + public function setUp(): void { parent::setUp(); /** @var \OCP\IConfig $request */ diff --git a/tests/lib/LargeFileHelperGetFileSizeTest.php b/tests/lib/LargeFileHelperGetFileSizeTest.php index f1b610e57e36..90430dd2a4d2 100644 --- a/tests/lib/LargeFileHelperGetFileSizeTest.php +++ b/tests/lib/LargeFileHelperGetFileSizeTest.php @@ -20,7 +20,7 @@ class LargeFileHelperGetFileSizeTest extends TestCase { /** @var \OC\LargeFileHelper */ protected $helper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->helper = new \OC\LargeFileHelper(); } diff --git a/tests/lib/LargeFileHelperTest.php b/tests/lib/LargeFileHelperTest.php index 7d155ff8b447..bfe26246918f 100644 --- a/tests/lib/LargeFileHelperTest.php +++ b/tests/lib/LargeFileHelperTest.php @@ -11,7 +11,7 @@ class LargeFileHelperTest extends TestCase { protected $helper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->helper = new \OC\LargeFileHelper; } diff --git a/tests/lib/Lock/DBLockingProviderTest.php b/tests/lib/Lock/DBLockingProviderTest.php index 68c6a54d6ccf..e754f818aa0a 100644 --- a/tests/lib/Lock/DBLockingProviderTest.php +++ b/tests/lib/Lock/DBLockingProviderTest.php @@ -48,7 +48,7 @@ class DBLockingProviderTest extends LockingProvider { private $currentTime; - public function setUp() { + public function setUp(): void { $this->currentTime = \time(); $this->timeFactory = $this->createMock('\OCP\AppFramework\Utility\ITimeFactory'); $this->timeFactory->expects($this->any()) @@ -69,7 +69,7 @@ protected function getInstance() { return new \OC\Lock\DBLockingProvider($this->connection, \OC::$server->getLogger(), $this->timeFactory, 3600); } - public function tearDown() { + public function tearDown(): void { $this->connection->executeQuery('DELETE FROM `*PREFIX*file_locks`'); parent::tearDown(); } diff --git a/tests/lib/Lock/LockingProvider.php b/tests/lib/Lock/LockingProvider.php index a2ddeb332f88..c6eecf118db8 100644 --- a/tests/lib/Lock/LockingProvider.php +++ b/tests/lib/Lock/LockingProvider.php @@ -36,7 +36,7 @@ abstract class LockingProvider extends TestCase { */ abstract protected function getInstance(); - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = $this->getInstance(); } diff --git a/tests/lib/Lock/MemcacheLockingProviderTest.php b/tests/lib/Lock/MemcacheLockingProviderTest.php index 5ba25e0c2c4e..e702a9e2c64e 100644 --- a/tests/lib/Lock/MemcacheLockingProviderTest.php +++ b/tests/lib/Lock/MemcacheLockingProviderTest.php @@ -38,7 +38,7 @@ protected function getInstance() { return new \OC\Lock\MemcacheLockingProvider($this->memcache); } - public function tearDown() { + public function tearDown(): void { $this->memcache->clear(); parent::tearDown(); } diff --git a/tests/lib/Lock/Persistent/LockManagerTest.php b/tests/lib/Lock/Persistent/LockManagerTest.php index 49b185805f83..886f79a230ff 100644 --- a/tests/lib/Lock/Persistent/LockManagerTest.php +++ b/tests/lib/Lock/Persistent/LockManagerTest.php @@ -46,7 +46,7 @@ class LockManagerTest extends TestCase { /** @var ITimeFactory | \PHPUnit\Framework\MockObject\MockObject */ private $timeFactory; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->lockMapper = $this->createMock(LockMapper::class); diff --git a/tests/lib/Lock/Persistent/LockMapperTest.php b/tests/lib/Lock/Persistent/LockMapperTest.php index a374a85e4ddd..c33939e11c13 100644 --- a/tests/lib/Lock/Persistent/LockMapperTest.php +++ b/tests/lib/Lock/Persistent/LockMapperTest.php @@ -66,7 +66,7 @@ class LockMapperTest extends TestCase { /** @var ITimeFactory */ private $timeFactory; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->db = \OC::$server->getDatabaseConnection(); @@ -117,7 +117,7 @@ public function providesInvalidEntities() { ]; } - protected function tearDown() { + protected function tearDown(): void { foreach ($this->locks as $lock) { $this->mapper->delete($lock); } diff --git a/tests/lib/Log/OwncloudTest.php b/tests/lib/Log/OwncloudTest.php index 3a5ef87d6c07..d1f5d0261ae0 100644 --- a/tests/lib/Log/OwncloudTest.php +++ b/tests/lib/Log/OwncloudTest.php @@ -29,7 +29,7 @@ class OwncloudTest extends TestCase { private $restore_logfile; private $restore_logdateformat; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = \OC::$server->getConfig(); $this->restore_logfile = $config->getSystemValue("logfile"); @@ -38,7 +38,7 @@ protected function setUp() { $config->setSystemValue("logfile", $config->getSystemValue('datadirectory') . "/logtest"); Owncloud::init(); } - protected function tearDown() { + protected function tearDown(): void { $config = \OC::$server->getConfig(); if (isset($this->restore_logfile)) { $config->getSystemValue("logfile", $this->restore_logfile); diff --git a/tests/lib/LoggerTest.php b/tests/lib/LoggerTest.php index ebfa71c88338..1446ed59d330 100644 --- a/tests/lib/LoggerTest.php +++ b/tests/lib/LoggerTest.php @@ -27,7 +27,7 @@ class LoggerTest extends TestCase { /** @var EventDispatcherInterface | \PHPUnit\Framework\MockObject\MockObject */ private $eventDispatcher; - protected function setUp() { + protected function setUp(): void { parent::setUp(); self::$logs = []; diff --git a/tests/lib/Mail/MailerTest.php b/tests/lib/Mail/MailerTest.php index 01706b8001b6..78bca0913db8 100644 --- a/tests/lib/Mail/MailerTest.php +++ b/tests/lib/Mail/MailerTest.php @@ -25,7 +25,7 @@ class MailerTest extends TestCase { /** @var Mailer */ private $mailer; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) diff --git a/tests/lib/Mail/MessageTest.php b/tests/lib/Mail/MessageTest.php index f30ff8ae7b6e..8fd493883ac5 100644 --- a/tests/lib/Mail/MessageTest.php +++ b/tests/lib/Mail/MessageTest.php @@ -30,7 +30,7 @@ public function mailAddressProvider() { ]; } - public function setUp() { + public function setUp(): void { parent::setUp(); $this->swiftMessage = $this->getMockBuilder('\Swift_Message') diff --git a/tests/lib/Memcache/APCuTest.php b/tests/lib/Memcache/APCuTest.php index d82fbacdd29d..85b24f1d115c 100644 --- a/tests/lib/Memcache/APCuTest.php +++ b/tests/lib/Memcache/APCuTest.php @@ -10,7 +10,7 @@ namespace Test\Memcache; class APCuTest extends Cache { - protected function setUp() { + protected function setUp(): void { parent::setUp(); if (!\OC\Memcache\APCu::isAvailable()) { diff --git a/tests/lib/Memcache/ArrayCacheTest.php b/tests/lib/Memcache/ArrayCacheTest.php index 3ae8c116a01b..4e3623d344d0 100644 --- a/tests/lib/Memcache/ArrayCacheTest.php +++ b/tests/lib/Memcache/ArrayCacheTest.php @@ -10,7 +10,7 @@ namespace Test\Memcache; class ArrayCacheTest extends Cache { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = new \OC\Memcache\ArrayCache(''); } diff --git a/tests/lib/Memcache/Cache.php b/tests/lib/Memcache/Cache.php index f44fe712c225..6b1263f429c1 100644 --- a/tests/lib/Memcache/Cache.php +++ b/tests/lib/Memcache/Cache.php @@ -122,7 +122,7 @@ public function testCadChanged() { $this->assertTrue($this->instance->hasKey('foo')); } - protected function tearDown() { + protected function tearDown(): void { if ($this->instance) { $this->instance->clear(); } diff --git a/tests/lib/Memcache/MemcachedTest.php b/tests/lib/Memcache/MemcachedTest.php index 58550a01d757..b50a88503416 100644 --- a/tests/lib/Memcache/MemcachedTest.php +++ b/tests/lib/Memcache/MemcachedTest.php @@ -24,7 +24,7 @@ public static function setUpBeforeClass() { } } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = new \OC\Memcache\Memcached($this->getUniqueID()); } diff --git a/tests/lib/Memcache/RedisTest.php b/tests/lib/Memcache/RedisTest.php index 995793c3f672..88e8ed76971c 100644 --- a/tests/lib/Memcache/RedisTest.php +++ b/tests/lib/Memcache/RedisTest.php @@ -25,7 +25,7 @@ public static function setUpBeforeClass() { } } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = new \OC\Memcache\Redis($this->getUniqueID()); } diff --git a/tests/lib/Migration/BackgroundRepairTest.php b/tests/lib/Migration/BackgroundRepairTest.php index 1395559098cd..1c815bace4dd 100644 --- a/tests/lib/Migration/BackgroundRepairTest.php +++ b/tests/lib/Migration/BackgroundRepairTest.php @@ -65,7 +65,7 @@ class BackgroundRepairTest extends TestCase { /** @var ILogger | \PHPUnit\Framework\MockObject\MockObject */ private $logger; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->jobList = $this->getMockBuilder('OC\BackgroundJob\JobList') diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index 12b1548f8b0c..15572b26d3e6 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -25,7 +25,7 @@ class NavigationManagerTest extends TestCase { /** @var \OC\NavigationManager */ protected $navigationManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->navigationManager = new NavigationManager(); diff --git a/tests/lib/Notification/ActionTest.php b/tests/lib/Notification/ActionTest.php index faaffc38dcaa..48bfadbf1a5c 100644 --- a/tests/lib/Notification/ActionTest.php +++ b/tests/lib/Notification/ActionTest.php @@ -29,7 +29,7 @@ class ActionTest extends TestCase { /** @var IAction */ protected $action; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->action = new Action(); } diff --git a/tests/lib/Notification/ManagerTest.php b/tests/lib/Notification/ManagerTest.php index 94ba2ffd5c9c..9d17f70ca12c 100644 --- a/tests/lib/Notification/ManagerTest.php +++ b/tests/lib/Notification/ManagerTest.php @@ -38,7 +38,7 @@ class ManagerTest extends TestCase { /** @var EventDispatcherInterface */ protected $eventDispatcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $eventMap = []; diff --git a/tests/lib/Notification/NotificationTest.php b/tests/lib/Notification/NotificationTest.php index 1d0ec99b3437..e0d0017f3d2c 100644 --- a/tests/lib/Notification/NotificationTest.php +++ b/tests/lib/Notification/NotificationTest.php @@ -29,7 +29,7 @@ class NotificationTest extends TestCase { /** @var INotification */ protected $notification; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->notification = new Notification(); } diff --git a/tests/lib/OCS/PrivatedataTest.php b/tests/lib/OCS/PrivatedataTest.php index adb7b8d606a5..6a63896319b2 100644 --- a/tests/lib/OCS/PrivatedataTest.php +++ b/tests/lib/OCS/PrivatedataTest.php @@ -32,7 +32,7 @@ class PrivatedataTest extends \Test\TestCase { private $appKey; - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC::$server->getSession()->set('user_id', 'user1'); $this->appKey = $this->getUniqueID('app'); diff --git a/tests/lib/OCS/ProviderTest.php b/tests/lib/OCS/ProviderTest.php index d8470916ebed..2e6cdfda06dc 100644 --- a/tests/lib/OCS/ProviderTest.php +++ b/tests/lib/OCS/ProviderTest.php @@ -31,7 +31,7 @@ class ProviderTest extends \Test\TestCase { /** @var Provider */ private $ocsProvider; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->request = $this->getMockBuilder('\\OCP\\IRequest')->getMock(); diff --git a/tests/lib/Preview/BitmapTest.php b/tests/lib/Preview/BitmapTest.php index 1c5671610afe..2c808cffb787 100644 --- a/tests/lib/Preview/BitmapTest.php +++ b/tests/lib/Preview/BitmapTest.php @@ -29,7 +29,7 @@ * @package Test\Preview */ class BitmapTest extends Provider { - public function setUp() { + public function setUp(): void { parent::setUp(); $fileName = 'testimage.eps'; diff --git a/tests/lib/Preview/ImageTest.php b/tests/lib/Preview/ImageTest.php index 38be56cc7781..3488d8fa90bc 100644 --- a/tests/lib/Preview/ImageTest.php +++ b/tests/lib/Preview/ImageTest.php @@ -29,7 +29,7 @@ * @package Test\Preview */ class ImageTest extends Provider { - public function setUp() { + public function setUp(): void { parent::setUp(); $fileName = 'testimage.jpg'; diff --git a/tests/lib/Preview/MP3Test.php b/tests/lib/Preview/MP3Test.php index f30c141d9b4b..b02af7d0a32c 100644 --- a/tests/lib/Preview/MP3Test.php +++ b/tests/lib/Preview/MP3Test.php @@ -29,7 +29,7 @@ * @package Test\Preview */ class MP3Test extends Provider { - public function setUp() { + public function setUp(): void { parent::setUp(); $fileName = 'testimage.mp3'; diff --git a/tests/lib/Preview/MovieTest.php b/tests/lib/Preview/MovieTest.php index 043ceacc5234..c75cafbdbfe5 100644 --- a/tests/lib/Preview/MovieTest.php +++ b/tests/lib/Preview/MovieTest.php @@ -29,7 +29,7 @@ * @package Test\Preview */ class MovieTest extends Provider { - public function setUp() { + public function setUp(): void { $avconvBinary = \OC_Helper::findBinaryPath('avconv'); $ffmpegBinary = ($avconvBinary) ? null : \OC_Helper::findBinaryPath('ffmpeg'); diff --git a/tests/lib/Preview/OfficeTest.php b/tests/lib/Preview/OfficeTest.php index 6488a53dc084..e9e26835c98d 100644 --- a/tests/lib/Preview/OfficeTest.php +++ b/tests/lib/Preview/OfficeTest.php @@ -29,7 +29,7 @@ * @package Test\Preview */ class OfficeTest extends Provider { - public function setUp() { + public function setUp(): void { $libreofficeBinary = \OC_Helper::findBinaryPath('libreoffice'); $openofficeBinary = ($libreofficeBinary) ? null : \OC_Helper::findBinaryPath('openoffice'); diff --git a/tests/lib/Preview/Provider.php b/tests/lib/Preview/Provider.php index 5bd962ca1508..ebc1ab6abd3e 100644 --- a/tests/lib/Preview/Provider.php +++ b/tests/lib/Preview/Provider.php @@ -48,7 +48,7 @@ abstract class Provider extends \Test\TestCase { /** @var \OC\Files\View */ protected $rootView; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $userManager = \OC::$server->getUserManager(); @@ -63,7 +63,7 @@ protected function setUp() { $this->userId = $userId; } - protected function tearDown() { + protected function tearDown(): void { $this->logout(); parent::tearDown(); diff --git a/tests/lib/Preview/SVGTest.php b/tests/lib/Preview/SVGTest.php index 9d129d280564..c9ba39edbf02 100644 --- a/tests/lib/Preview/SVGTest.php +++ b/tests/lib/Preview/SVGTest.php @@ -29,7 +29,7 @@ * @package Test\Preview */ class SVGTest extends Provider { - public function setUp() { + public function setUp(): void { $checkImagick = new \Imagick(); if (\count($checkImagick->queryFormats('SVG')) === 1) { parent::setUp(); diff --git a/tests/lib/Preview/TXTTest.php b/tests/lib/Preview/TXTTest.php index b3d0e96e35d4..f87ffe7916fd 100644 --- a/tests/lib/Preview/TXTTest.php +++ b/tests/lib/Preview/TXTTest.php @@ -29,7 +29,7 @@ * @package Test\Preview */ class TXTTest extends Provider { - public function setUp() { + public function setUp(): void { parent::setUp(); $fileName = 'lorem-big.txt'; diff --git a/tests/lib/PreviewManagerTest.php b/tests/lib/PreviewManagerTest.php index 804a5a20c41c..d5fc32b2d050 100644 --- a/tests/lib/PreviewManagerTest.php +++ b/tests/lib/PreviewManagerTest.php @@ -57,7 +57,7 @@ class PreviewManagerTest extends TestCase { /** @var IPreview */ private $previewManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user = $this->createUser(self::TEST_PREVIEW_USER1, self::TEST_PREVIEW_USER1); diff --git a/tests/lib/PreviewTest.php b/tests/lib/PreviewTest.php index 8b4254deab87..191d41374172 100644 --- a/tests/lib/PreviewTest.php +++ b/tests/lib/PreviewTest.php @@ -75,7 +75,7 @@ class PreviewTest extends TestCase { /** * Make sure your configuration file doesn't contain any additional providers */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->createUser(self::TEST_PREVIEW_USER1, self::TEST_PREVIEW_USER1); @@ -125,7 +125,7 @@ protected function setUp() { $this->prepareSample('testimage.gif', 64, 64); } - protected function tearDown() { + protected function tearDown(): void { $this->logout(); parent::tearDown(); diff --git a/tests/lib/PublicNamespace/ContactsTest.php b/tests/lib/PublicNamespace/ContactsTest.php index bb458ae68e81..1cf5487371d8 100644 --- a/tests/lib/PublicNamespace/ContactsTest.php +++ b/tests/lib/PublicNamespace/ContactsTest.php @@ -22,7 +22,7 @@ namespace Test\PublicNamespace; class ContactsTest extends \Test\TestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OCP\Contacts::clear(); } diff --git a/tests/lib/PublicNamespace/UtilTest.php b/tests/lib/PublicNamespace/UtilTest.php index 43d3eecd73f2..bdfb19965c08 100644 --- a/tests/lib/PublicNamespace/UtilTest.php +++ b/tests/lib/PublicNamespace/UtilTest.php @@ -22,7 +22,7 @@ namespace Test\PublicNamespace; class UtilTest extends \Test\TestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OCP\Contacts::clear(); } diff --git a/tests/lib/Repair/AppsTest.php b/tests/lib/Repair/AppsTest.php index 67db56a24c5e..eb1e45727b38 100644 --- a/tests/lib/Repair/AppsTest.php +++ b/tests/lib/Repair/AppsTest.php @@ -45,7 +45,7 @@ class AppsTest extends TestCase { /** @var \OC_Defaults | \PHPUnit\Framework\MockObject\MockObject */ private $defaults; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appManager = $this->createMock(IAppManager::class); $this->defaults = $this->createMock(\OC_Defaults::class); diff --git a/tests/lib/Repair/CleanTagsTest.php b/tests/lib/Repair/CleanTagsTest.php index 959312e5a67b..c7806c82fbc1 100644 --- a/tests/lib/Repair/CleanTagsTest.php +++ b/tests/lib/Repair/CleanTagsTest.php @@ -34,7 +34,7 @@ class CleanTagsTest extends \Test\TestCase { /** @var IOutput */ private $outputMock; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->outputMock = $this->getMockBuilder('\OCP\Migration\IOutput') @@ -50,7 +50,7 @@ protected function setUp() { $this->cleanUpTables(); } - protected function tearDown() { + protected function tearDown(): void { $this->cleanUpTables(); parent::tearDown(); diff --git a/tests/lib/Repair/DisableExtraThemesTest.php b/tests/lib/Repair/DisableExtraThemesTest.php index eb00f18f6491..02bf2be36c0e 100644 --- a/tests/lib/Repair/DisableExtraThemesTest.php +++ b/tests/lib/Repair/DisableExtraThemesTest.php @@ -32,7 +32,7 @@ class DisableExtraThemesTest extends TestCase { /** @var IOutput|\PHPUnit\Framework\MockObject\MockObject */ protected $output; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/Repair/DropOldJobsTest.php b/tests/lib/Repair/DropOldJobsTest.php index 8f4a701c2623..e076ade39f40 100644 --- a/tests/lib/Repair/DropOldJobsTest.php +++ b/tests/lib/Repair/DropOldJobsTest.php @@ -22,7 +22,7 @@ class DropOldJobsTest extends \Test\TestCase { /** @var IJobList */ protected $jobList; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->jobList = \OC::$server->getJobList(); diff --git a/tests/lib/Repair/DropOldTablesTest.php b/tests/lib/Repair/DropOldTablesTest.php index 5e48685fefee..6be77ac26e5f 100644 --- a/tests/lib/Repair/DropOldTablesTest.php +++ b/tests/lib/Repair/DropOldTablesTest.php @@ -20,7 +20,7 @@ class DropOldTablesTest extends \Test\TestCase { /** @var \OCP\IDBConnection */ protected $connection; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); diff --git a/tests/lib/Repair/OldGroupMembershipSharesTest.php b/tests/lib/Repair/OldGroupMembershipSharesTest.php index 27434c71ad8d..ae00131d5e55 100644 --- a/tests/lib/Repair/OldGroupMembershipSharesTest.php +++ b/tests/lib/Repair/OldGroupMembershipSharesTest.php @@ -30,7 +30,7 @@ class OldGroupMembershipSharesTest extends \Test\TestCase { /** @var \OCP\IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ protected $groupManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); /** \OCP\IGroupManager|\PHPUnit\Framework\MockObject\MockObject */ @@ -42,7 +42,7 @@ protected function setUp() { $this->deleteAllShares(); } - protected function tearDown() { + protected function tearDown(): void { $this->deleteAllShares(); parent::tearDown(); diff --git a/tests/lib/Repair/RemoveGetETagEntriesTest.php b/tests/lib/Repair/RemoveGetETagEntriesTest.php index 4991165c80e2..cd6f691f4eb3 100644 --- a/tests/lib/Repair/RemoveGetETagEntriesTest.php +++ b/tests/lib/Repair/RemoveGetETagEntriesTest.php @@ -36,7 +36,7 @@ class RemoveGetETagEntriesTest extends TestCase { /** @var \OCP\IDBConnection */ protected $connection; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); diff --git a/tests/lib/Repair/RemoveRootSharesTest.php b/tests/lib/Repair/RemoveRootSharesTest.php index cb32c11bd6c8..0f7041bcb7b7 100644 --- a/tests/lib/Repair/RemoveRootSharesTest.php +++ b/tests/lib/Repair/RemoveRootSharesTest.php @@ -51,7 +51,7 @@ class RemoveRootSharesTest extends \Test\TestCase { /** @var IRootFolder */ private $rootFolder; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->outputMock = $this->getMockBuilder('\OCP\Migration\IOutput') @@ -65,12 +65,12 @@ protected function setUp() { $this->repair = new RemoveRootShares($this->connection, $this->userManager, $this->rootFolder); } - protected function tearDown() { + protected function tearDown(): void { $qb = $this->connection->getQueryBuilder(); $qb->delete('share'); $qb->execute(); - return parent::tearDown(); + parent::tearDown(); } public function testRootSharesExist() { diff --git a/tests/lib/Repair/RepairCollationTest.php b/tests/lib/Repair/RepairCollationTest.php index 9e38515ecf68..945db7c11066 100644 --- a/tests/lib/Repair/RepairCollationTest.php +++ b/tests/lib/Repair/RepairCollationTest.php @@ -55,7 +55,7 @@ class RepairCollationTest extends TestCase { */ private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -71,7 +71,7 @@ protected function setUp() { $this->repair = new TestCollationRepair($this->config, $this->connection); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->getSchemaManager()->dropTable($this->tableName); parent::tearDown(); } diff --git a/tests/lib/Repair/RepairInnoDBTest.php b/tests/lib/Repair/RepairInnoDBTest.php index cf52184456a1..307a797326cc 100644 --- a/tests/lib/Repair/RepairInnoDBTest.php +++ b/tests/lib/Repair/RepairInnoDBTest.php @@ -27,7 +27,7 @@ class RepairInnoDBTest extends \Test\TestCase { /** @var string */ private $tableName; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -42,7 +42,7 @@ protected function setUp() { $this->repair = new \OC\Repair\InnoDB(); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->getSchemaManager()->dropTable($this->tableName); parent::tearDown(); } diff --git a/tests/lib/Repair/RepairInvalidSharesTest.php b/tests/lib/Repair/RepairInvalidSharesTest.php index 71041e9a4fb3..a89d140c3be2 100644 --- a/tests/lib/Repair/RepairInvalidSharesTest.php +++ b/tests/lib/Repair/RepairInvalidSharesTest.php @@ -29,7 +29,7 @@ class RepairInvalidSharesTest extends TestCase { /** @var \OCP\IDBConnection */ private $connection; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->getMockBuilder('OCP\IConfig') @@ -47,7 +47,7 @@ protected function setUp() { $this->repair = new RepairInvalidShares($config, $this->connection); } - protected function tearDown() { + protected function tearDown(): void { $this->deleteAllShares(); parent::tearDown(); diff --git a/tests/lib/Repair/RepairMimeTypesTest.php b/tests/lib/Repair/RepairMimeTypesTest.php index 1816f588df48..f4d5c54a9588 100644 --- a/tests/lib/Repair/RepairMimeTypesTest.php +++ b/tests/lib/Repair/RepairMimeTypesTest.php @@ -32,7 +32,7 @@ class RepairMimeTypesTest extends \Test\TestCase { /** @var IMimeTypeLoader */ private $mimetypeLoader; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->savedMimetypeLoader = \OC::$server->getMimeTypeLoader(); @@ -52,7 +52,7 @@ protected function setUp() { $this->repair = new \OC\Repair\RepairMimeTypes($config); } - protected function tearDown() { + protected function tearDown(): void { $this->storage->getCache()->clear(); $sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?'; \OC_DB::executeAudited($sql, [$this->storage->getId()]); diff --git a/tests/lib/Repair/RepairMismatchFileCachePathTest.php b/tests/lib/Repair/RepairMismatchFileCachePathTest.php index 30c285118339..7a55035589f9 100644 --- a/tests/lib/Repair/RepairMismatchFileCachePathTest.php +++ b/tests/lib/Repair/RepairMismatchFileCachePathTest.php @@ -32,7 +32,7 @@ class RepairMismatchFileCachePathTest extends TestCase { private $connection; private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -51,7 +51,7 @@ protected function setUp() { $this->repair->setCountOnly(false); } - protected function tearDown() { + protected function tearDown(): void { $qb = $this->connection->getQueryBuilder(); $qb->delete('filecache')->execute(); parent::tearDown(); diff --git a/tests/lib/Repair/RepairOrphanedSubshareTest.php b/tests/lib/Repair/RepairOrphanedSubshareTest.php index f709235daae2..dc780b226311 100644 --- a/tests/lib/Repair/RepairOrphanedSubshareTest.php +++ b/tests/lib/Repair/RepairOrphanedSubshareTest.php @@ -44,14 +44,14 @@ class RepairOrphanedSubshareTest extends TestCase { /** @var IRepairStep */ private $repair; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); $this->repair = new RepairOrphanedSubshare($this->connection); $this->createUser('admin'); } - protected function tearDown() { + protected function tearDown(): void { $this->deleteAllShares(); $this->tearDownUserTrait(); parent::tearDown(); diff --git a/tests/lib/Repair/RepairSqliteAutoincrementTest.php b/tests/lib/Repair/RepairSqliteAutoincrementTest.php index ee5ab5419cd8..a838cb23d62a 100644 --- a/tests/lib/Repair/RepairSqliteAutoincrementTest.php +++ b/tests/lib/Repair/RepairSqliteAutoincrementTest.php @@ -36,7 +36,7 @@ class RepairSqliteAutoincrementTest extends \Test\TestCase { */ private $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -52,7 +52,7 @@ protected function setUp() { $this->repair = new \OC\Repair\SqliteAutoincrement($this->connection); } - protected function tearDown() { + protected function tearDown(): void { $this->connection->getSchemaManager()->dropTable($this->tableName); parent::tearDown(); } diff --git a/tests/lib/Repair/RepairSubSharesTest.php b/tests/lib/Repair/RepairSubSharesTest.php index 1eeee7e0654e..519e97049f0f 100644 --- a/tests/lib/Repair/RepairSubSharesTest.php +++ b/tests/lib/Repair/RepairSubSharesTest.php @@ -43,7 +43,7 @@ class RepairSubSharesTest extends TestCase { /** @var IRepairStep */ private $repair; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -51,7 +51,7 @@ protected function setUp() { $this->createUser('admin'); } - protected function tearDown() { + protected function tearDown(): void { $this->deleteAllUsersAndGroups(); $this->deleteAllShares(); parent::tearDown(); diff --git a/tests/lib/Repair/RepairUnmergedSharesTest.php b/tests/lib/Repair/RepairUnmergedSharesTest.php index 457d1aafe557..96682f7bbd76 100644 --- a/tests/lib/Repair/RepairUnmergedSharesTest.php +++ b/tests/lib/Repair/RepairUnmergedSharesTest.php @@ -55,7 +55,7 @@ class RepairUnmergedSharesTest extends TestCase { /** @var IGroupManager */ private $groupManager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $config = $this->getMockBuilder('OCP\IConfig') @@ -127,7 +127,7 @@ public function testDisabledVersions($version, $ran) { $this->repair->run($outputMock); } - protected function tearDown() { + protected function tearDown(): void { $this->deleteAllShares(); parent::tearDown(); diff --git a/tests/lib/RepairStepTest.php b/tests/lib/RepairStepTest.php index cdb1ecbef3ba..442b4e468d72 100644 --- a/tests/lib/RepairStepTest.php +++ b/tests/lib/RepairStepTest.php @@ -38,7 +38,7 @@ class RepairTest extends TestCase { /** @var string[] */ private $outputArray; - public function setUp() { + public function setUp(): void { parent::setUp(); $dispatcher = new EventDispatcher(); $this->repair = new \OC\Repair([], $dispatcher); diff --git a/tests/lib/Route/RouterTest.php b/tests/lib/Route/RouterTest.php index 2e8f54e1c5fe..c9fce4f6688f 100644 --- a/tests/lib/Route/RouterTest.php +++ b/tests/lib/Route/RouterTest.php @@ -40,7 +40,7 @@ class RouterTest extends \Test\TestCase { /** @var ILogger */ private $l; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->l = $this->createMock(ILogger::class); } diff --git a/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php b/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php index 0022d1a87380..7d554942884c 100644 --- a/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php +++ b/tests/lib/Security/CSP/ContentSecurityPolicyManagerTest.php @@ -30,7 +30,7 @@ class ContentSecurityPolicyManagerTest extends TestCase { /** @var ContentSecurityPolicyManager */ private $contentSecurityPolicyManager; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->contentSecurityPolicyManager = new ContentSecurityPolicyManager(); } diff --git a/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php b/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php index 1d944fb8c936..b894dc93e1f0 100644 --- a/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php +++ b/tests/lib/Security/CSRF/CsrfTokenGeneratorTest.php @@ -27,7 +27,7 @@ class CsrfTokenGeneratorTest extends \Test\TestCase { /** @var \OC\Security\CSRF\CsrfTokenGenerator */ private $csrfTokenGenerator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->random = $this->getMockBuilder('\OCP\Security\ISecureRandom') ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Security/CSRF/CsrfTokenManagerTest.php b/tests/lib/Security/CSRF/CsrfTokenManagerTest.php index 9600521647fe..bad88190a9d6 100644 --- a/tests/lib/Security/CSRF/CsrfTokenManagerTest.php +++ b/tests/lib/Security/CSRF/CsrfTokenManagerTest.php @@ -29,7 +29,7 @@ class CsrfTokenManagerTest extends \Test\TestCase { /** @var \OC\Security\CSRF\TokenStorage\SessionStorage */ private $storageInterface; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->tokenGenerator = $this->getMockBuilder('\OC\Security\CSRF\CsrfTokenGenerator') ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php index 89ae579ae5fb..e5ce01c91329 100644 --- a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php +++ b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php @@ -27,7 +27,7 @@ class SessionStorageTest extends \Test\TestCase { /** @var \OC\Security\CSRF\TokenStorage\SessionStorage */ private $sessionStorage; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->session = $this->getMockBuilder('\OCP\ISession') ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php index 76d97bd439de..59ffe72be033 100644 --- a/tests/lib/Security/CertificateManagerTest.php +++ b/tests/lib/Security/CertificateManagerTest.php @@ -24,7 +24,7 @@ class CertificateManagerTest extends \Test\TestCase { /** @var String */ private $username; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->username = $this->getUniqueID('', 20); diff --git a/tests/lib/Security/CertificateTest.php b/tests/lib/Security/CertificateTest.php index 6d8a8af52567..922d947fb526 100644 --- a/tests/lib/Security/CertificateTest.php +++ b/tests/lib/Security/CertificateTest.php @@ -32,7 +32,7 @@ class CertificateTest extends \Test\TestCase { /** @var Certificate That contains an expired certificate */ protected $expiredCertificate; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $goodCertificate = \file_get_contents(__DIR__ . '/../../data/certificates/goodCertificate.crt'); diff --git a/tests/lib/Security/CredentialsManagerTest.php b/tests/lib/Security/CredentialsManagerTest.php index 6230065dceeb..4164ad0f010c 100644 --- a/tests/lib/Security/CredentialsManagerTest.php +++ b/tests/lib/Security/CredentialsManagerTest.php @@ -36,7 +36,7 @@ class CredentialsManagerTest extends \Test\TestCase { /** @var CredentialsManager */ protected $manager; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->crypto = $this->createMock('\OCP\Security\ICrypto'); $this->dbConnection = $this->getMockBuilder('\OC\DB\Connection') diff --git a/tests/lib/Security/CryptoTest.php b/tests/lib/Security/CryptoTest.php index 6ee3bf5b3019..98bce3b3f2ab 100644 --- a/tests/lib/Security/CryptoTest.php +++ b/tests/lib/Security/CryptoTest.php @@ -22,7 +22,7 @@ public function defaultEncryptionProvider() { /** @var Crypto */ protected $crypto; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->crypto = new Crypto(\OC::$server->getConfig(), \OC::$server->getSecureRandom()); } diff --git a/tests/lib/Security/HasherTest.php b/tests/lib/Security/HasherTest.php index 658fbc6af109..53685a99188e 100644 --- a/tests/lib/Security/HasherTest.php +++ b/tests/lib/Security/HasherTest.php @@ -76,7 +76,7 @@ public function allHashProviders() { /** @var \OCP\IConfig */ protected $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder('\OCP\IConfig') diff --git a/tests/lib/Security/SecureRandomTest.php b/tests/lib/Security/SecureRandomTest.php index 4b368acc6739..51806cb1f89f 100644 --- a/tests/lib/Security/SecureRandomTest.php +++ b/tests/lib/Security/SecureRandomTest.php @@ -34,7 +34,7 @@ public static function charCombinations() { /** @var SecureRandom */ protected $rng; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->rng = new \OC\Security\SecureRandom(); } diff --git a/tests/lib/Security/TrustedDomainHelperTest.php b/tests/lib/Security/TrustedDomainHelperTest.php index 8cddf36aa98b..c001115a8ca8 100644 --- a/tests/lib/Security/TrustedDomainHelperTest.php +++ b/tests/lib/Security/TrustedDomainHelperTest.php @@ -18,7 +18,7 @@ class TrustedDomainHelperTest extends \Test\TestCase { /** @var IConfig */ protected $config; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock(); diff --git a/tests/lib/ServerTest.php b/tests/lib/ServerTest.php index a7c3085e7d11..7abe1c475589 100644 --- a/tests/lib/ServerTest.php +++ b/tests/lib/ServerTest.php @@ -133,7 +133,7 @@ class ServerTest extends TestCase { /** @var Server */ protected $server; - public function setUp() { + public function setUp(): void { parent::setUp(); $config = new Config(\OC::$configDir); $this->server = new Server('', $config); diff --git a/tests/lib/Session/CryptoSessionDataTest.php b/tests/lib/Session/CryptoSessionDataTest.php index 4d852ef41563..c294d8f25058 100644 --- a/tests/lib/Session/CryptoSessionDataTest.php +++ b/tests/lib/Session/CryptoSessionDataTest.php @@ -33,7 +33,7 @@ class CryptoSessionDataTest extends Session { /** @var \OCP\ISession */ protected $wrappedSession; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->wrappedSession = new \OC\Session\Memory(static::getUniqueID()); diff --git a/tests/lib/Session/CryptoWrappingTest.php b/tests/lib/Session/CryptoWrappingTest.php index 96ebeb564235..0e83122743a8 100644 --- a/tests/lib/Session/CryptoWrappingTest.php +++ b/tests/lib/Session/CryptoWrappingTest.php @@ -34,7 +34,7 @@ class CryptoWrappingTest extends TestCase { /** @var \OC\Session\CryptoSessionData */ protected $instance; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->wrappedSession = $this->getMockBuilder('OCP\ISession') diff --git a/tests/lib/Session/MemoryTest.php b/tests/lib/Session/MemoryTest.php index 1297bd162cec..6f0418d1c5f9 100644 --- a/tests/lib/Session/MemoryTest.php +++ b/tests/lib/Session/MemoryTest.php @@ -10,7 +10,7 @@ namespace Test\Session; class MemoryTest extends Session { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->instance = new \OC\Session\Memory($this->getUniqueID()); } diff --git a/tests/lib/Session/Session.php b/tests/lib/Session/Session.php index e7f3ea0fd2ad..629ec813fd4f 100644 --- a/tests/lib/Session/Session.php +++ b/tests/lib/Session/Session.php @@ -15,7 +15,7 @@ abstract class Session extends \Test\TestCase { */ protected $instance; - protected function tearDown() { + protected function tearDown(): void { $this->instance->clear(); parent::tearDown(); } diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php index 2642165c0b1d..06930ff4c382 100644 --- a/tests/lib/Settings/ManagerTest.php +++ b/tests/lib/Settings/ManagerTest.php @@ -41,7 +41,7 @@ class SettingsManagerTest extends TestCase { protected $certificateManager; protected $factory; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->l = $this->getMockBuilder('\OCP\IL10N')->getMock(); diff --git a/tests/lib/SetupTest.php b/tests/lib/SetupTest.php index a844e804b10a..3fadca623cc9 100644 --- a/tests/lib/SetupTest.php +++ b/tests/lib/SetupTest.php @@ -27,7 +27,7 @@ class SetupTest extends \Test\TestCase { /** @var \OCP\Security\ISecureRandom | \PHPUnit\Framework\MockObject\MockObject */ protected $random; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock('\OCP\IConfig'); diff --git a/tests/lib/Share/MailNotificationsTest.php b/tests/lib/Share/MailNotificationsTest.php index 417b64530520..d7aee14f42f7 100644 --- a/tests/lib/Share/MailNotificationsTest.php +++ b/tests/lib/Share/MailNotificationsTest.php @@ -69,7 +69,7 @@ class MailNotificationsTest extends TestCase { /** @var MailNotifications */ private $mailNotifications; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->shareManager = $this->createMock(IManager::class); diff --git a/tests/lib/Share/ShareTest.php b/tests/lib/Share/ShareTest.php index 58214d34377b..50d1e282e09b 100644 --- a/tests/lib/Share/ShareTest.php +++ b/tests/lib/Share/ShareTest.php @@ -49,7 +49,7 @@ class ShareTest extends \Test\TestCase { protected $dateInFuture; protected $dateInPast; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->user1 = $this->getUniqueID('user1_'); @@ -96,7 +96,7 @@ protected function setUp() { $this->dateInFuture = \date($dateFormat, $now + 20 * 60); } - protected function tearDown() { + protected function tearDown(): void { $query = \OC_DB::prepare('DELETE FROM `*PREFIX*share` WHERE `item_type` = ?'); $query->execute(['test']); \OC::$server->getAppConfig()->setValue('core', 'shareapi_allow_resharing', $this->resharing); diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index d3afb2c57f45..38fcfbb4e62c 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -61,7 +61,7 @@ class DefaultShareProviderTest extends TestCase { /** @var DefaultShareProvider */ protected $provider; - public function setUp() { + public function setUp(): void { $this->dbConn = \OC::$server->getDatabaseConnection(); $this->userManager = $this->createMock(IUserManager::class); $this->groupManager = $this->createMock(IGroupManager::class); @@ -80,7 +80,7 @@ public function setUp() { ); } - public function tearDown() { + public function tearDown(): void { $this->dbConn->getQueryBuilder()->delete('share')->execute(); $this->dbConn->getQueryBuilder()->delete('filecache')->execute(); $this->dbConn->getQueryBuilder()->delete('storages')->execute(); diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index d7fbf2eded65..d365a6bb4121 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -89,7 +89,7 @@ class ManagerTest extends \Test\TestCase { /** @var IDBConnection | \PHPUnit\Framework\MockObject\MockObject */ protected $connection; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->logger = $this->createMock('\OCP\ILogger'); @@ -135,7 +135,7 @@ public function setUp() { $this->factory->setProvider($this->defaultProvider); } - public function tearDown() { + public function tearDown(): void { // clear legacy hook handlers \OC_Hook::clear('\OC\Share'); parent::tearDown(); diff --git a/tests/lib/Share20/ShareTest.php b/tests/lib/Share20/ShareTest.php index cb3cabb230b3..ef9140043a66 100644 --- a/tests/lib/Share20/ShareTest.php +++ b/tests/lib/Share20/ShareTest.php @@ -34,7 +34,7 @@ class ShareTest extends \Test\TestCase { /** @var \OCP\Share\IShare */ protected $share; - public function setUp() { + public function setUp(): void { $this->rootFolder = $this->createMock('\OCP\Files\IRootFolder'); $this->userManager = $this->createMock('OCP\IUserManager'); $this->share = new \OC\Share20\Share($this->rootFolder, $this->userManager); diff --git a/tests/lib/StreamWrappersTest.php b/tests/lib/StreamWrappersTest.php index 575f8b639297..19ab8d2e0404 100644 --- a/tests/lib/StreamWrappersTest.php +++ b/tests/lib/StreamWrappersTest.php @@ -35,7 +35,7 @@ public static function setUpBeforeClass() { \OC_App::disable('files_trashbin'); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { if (self::$trashBinStatus) { \OC_App::enable('files_trashbin'); } diff --git a/tests/lib/SubAdminTest.php b/tests/lib/SubAdminTest.php index f172e70857b3..f7d8f2b86830 100644 --- a/tests/lib/SubAdminTest.php +++ b/tests/lib/SubAdminTest.php @@ -41,7 +41,7 @@ class SubAdminTest extends TestCase { /** @var \OCP\IGroup[] */ private $groups; - public function setup() { + public function setUp(): void { $this->users = []; $this->groups = []; @@ -83,7 +83,7 @@ public function setup() { ->execute(); } - public function tearDown() { + public function tearDown(): void { foreach ($this->users as $user) { $user->delete(); } diff --git a/tests/lib/SystemConfigTest.php b/tests/lib/SystemConfigTest.php index 85cf7e91868e..823e99a8a9d8 100644 --- a/tests/lib/SystemConfigTest.php +++ b/tests/lib/SystemConfigTest.php @@ -115,7 +115,7 @@ class SystemConfigTest extends TestCase { /** @var string */ private $randomTmpDir; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->randomTmpDir = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -124,7 +124,7 @@ protected function setUp() { $this->config = new \OC\Config($this->randomTmpDir, 'testconfig.php'); } - protected function tearDown() { + protected function tearDown(): void { \unlink($this->configFile); parent::tearDown(); } diff --git a/tests/lib/SystemTag/SystemTagManagerTest.php b/tests/lib/SystemTag/SystemTagManagerTest.php index 983028795778..241b4b5d228c 100644 --- a/tests/lib/SystemTag/SystemTagManagerTest.php +++ b/tests/lib/SystemTag/SystemTagManagerTest.php @@ -48,7 +48,7 @@ class SystemTagManagerTest extends TestCase { */ private $dispatcher; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -66,7 +66,7 @@ public function setUp() { $this->pruneTagsTables(); } - public function tearDown() { + public function tearDown(): void { $this->pruneTagsTables(); parent::tearDown(); } diff --git a/tests/lib/SystemTag/SystemTagObjectMapperTest.php b/tests/lib/SystemTag/SystemTagObjectMapperTest.php index 4a682f9a5e53..b4d698360ff1 100644 --- a/tests/lib/SystemTag/SystemTagObjectMapperTest.php +++ b/tests/lib/SystemTag/SystemTagObjectMapperTest.php @@ -64,7 +64,7 @@ class SystemTagObjectMapperTest extends TestCase { */ private $tag3; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->connection = \OC::$server->getDatabaseConnection(); @@ -108,7 +108,7 @@ public function setUp() { $this->tagMapper->assignTags('3', 'anothertype', $this->tag1->getId()); } - public function tearDown() { + public function tearDown(): void { $this->pruneTagsTables(); parent::tearDown(); } diff --git a/tests/lib/TagsTest.php b/tests/lib/TagsTest.php index 079837d1be90..10d6f346cebc 100644 --- a/tests/lib/TagsTest.php +++ b/tests/lib/TagsTest.php @@ -45,7 +45,7 @@ class TagsTest extends TestCase { /** @var \OCP\ITagManager */ protected $tagMgr; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $userId = $this->getUniqueID('user_'); @@ -62,7 +62,7 @@ protected function setUp() { $this->tagMgr = new TagManager($this->tagMapper, $this->userSession); } - protected function tearDown() { + protected function tearDown(): void { $conn = \OC::$server->getDatabaseConnection(); $conn->executeQuery('DELETE FROM `*PREFIX*vcategory_to_object`'); $conn->executeQuery('DELETE FROM `*PREFIX*vcategory`'); diff --git a/tests/lib/TempManagerTest.php b/tests/lib/TempManagerTest.php index 4a6592a8f5d4..713047c3047d 100644 --- a/tests/lib/TempManagerTest.php +++ b/tests/lib/TempManagerTest.php @@ -24,7 +24,7 @@ public function log($level, $message, array $context = []) { class TempManagerTest extends \Test\TestCase { protected $baseDir = null; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->baseDir = $this->getManager()->getTempBaseDir() . $this->getUniqueID('/oc_tmp_test'); @@ -33,7 +33,7 @@ protected function setUp() { } } - protected function tearDown() { + protected function tearDown(): void { \OC_Helper::rmdirr($this->baseDir); $this->baseDir = null; parent::tearDown(); diff --git a/tests/lib/Template/BaseTest.php b/tests/lib/Template/BaseTest.php index 2b7868d77306..2138000a7b1e 100644 --- a/tests/lib/Template/BaseTest.php +++ b/tests/lib/Template/BaseTest.php @@ -19,7 +19,7 @@ class BaseTest extends \Test\TestCase { /** @var string */ protected $serverRoot; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->serverRoot = \OC::$SERVERROOT; $this->theme = $this->getMockBuilder(ITheme::class) diff --git a/tests/lib/Template/CSSResourceLocatorTest.php b/tests/lib/Template/CSSResourceLocatorTest.php index a5b227972dd4..9594cddc141a 100644 --- a/tests/lib/Template/CSSResourceLocatorTest.php +++ b/tests/lib/Template/CSSResourceLocatorTest.php @@ -23,7 +23,7 @@ class CSSResourceLocatorTest extends TestCase { protected $appRoot = '/var/www/apps'; protected $themeAppDir = 'theme-best'; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); } diff --git a/tests/lib/Template/JSResourceLocatorTest.php b/tests/lib/Template/JSResourceLocatorTest.php index 052a8778dd5e..114a06067b91 100644 --- a/tests/lib/Template/JSResourceLocatorTest.php +++ b/tests/lib/Template/JSResourceLocatorTest.php @@ -23,7 +23,7 @@ class JSResourceLocatorTest extends TestCase { protected $appRoot = '/var/www/apps'; protected $themeAppDir = 'theme-best'; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->logger = $this->createMock(ILogger::class); } diff --git a/tests/lib/Template/ResourceLocatorTest.php b/tests/lib/Template/ResourceLocatorTest.php index 23741dc3e61c..1101dad4cf37 100644 --- a/tests/lib/Template/ResourceLocatorTest.php +++ b/tests/lib/Template/ResourceLocatorTest.php @@ -23,7 +23,7 @@ class ResourceLocatorTest extends \Test\TestCase { 'test2.js' ]; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->logger = $this->createMock('OCP\ILogger'); diff --git a/tests/lib/TemplateFunctionsTest.php b/tests/lib/TemplateFunctionsTest.php index 92d005ff6969..15c8829350e0 100644 --- a/tests/lib/TemplateFunctionsTest.php +++ b/tests/lib/TemplateFunctionsTest.php @@ -23,7 +23,7 @@ namespace Test; class TemplateFunctionsTest extends \Test\TestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $loader = new \OC\Autoloader([\OC::$SERVERROOT . '/lib']); diff --git a/tests/lib/TestCase.php b/tests/lib/TestCase.php index e58fd2ef43fc..1345bbbae338 100644 --- a/tests/lib/TestCase.php +++ b/tests/lib/TestCase.php @@ -101,7 +101,7 @@ protected function getTestTraits() { }); } - protected function setUp() { + protected function setUp(): void { // detect database access self::$wasDatabaseAllowed = true; if (!$this->IsDatabaseAccessAllowed()) { @@ -133,7 +133,7 @@ protected function setUp() { $_SERVER['REQUEST_METHOD'] = 'GET'; } - protected function tearDown() { + protected function tearDown(): void { // store testname in static attr for use in class teardown self::$lastTest = \get_class($this) . ':' . $this->getName(); @@ -219,7 +219,7 @@ protected static function getUniqueID($prefix = '', $length = 13) { ); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { // fail if still in a transaction after test run if (self::$wasDatabaseAllowed && \OC::$server->getDatabaseConnection()->inTransaction()) { // This is bad. But we cannot fail the unit test since we are already diff --git a/tests/lib/Theme/ThemeServiceTest.php b/tests/lib/Theme/ThemeServiceTest.php index 0e048d0adbe7..8dd9393c4be5 100644 --- a/tests/lib/Theme/ThemeServiceTest.php +++ b/tests/lib/Theme/ThemeServiceTest.php @@ -17,7 +17,7 @@ class ThemeServiceTest extends \PHPUnit\Framework\TestCase { */ private $environmentHelper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appManager = $this->getMockBuilder(IAppManager::class) ->getMock(); diff --git a/tests/lib/Theme/ThemeTest.php b/tests/lib/Theme/ThemeTest.php index c44d3da0d29e..c66322828997 100644 --- a/tests/lib/Theme/ThemeTest.php +++ b/tests/lib/Theme/ThemeTest.php @@ -11,7 +11,7 @@ class ThemeTest extends \PHPUnit\Framework\TestCase { */ private $sut; - protected function setUp() { + protected function setUp(): void { $this->sut = new Theme(); parent::setUp(); } diff --git a/tests/lib/Updater/VersionCheckTest.php b/tests/lib/Updater/VersionCheckTest.php index c6e0243f33ac..f800e1c0c585 100644 --- a/tests/lib/Updater/VersionCheckTest.php +++ b/tests/lib/Updater/VersionCheckTest.php @@ -33,7 +33,7 @@ class VersionCheckTest extends TestCase { /** @var VersionCheck | \PHPUnit\Framework\MockObject\MockObject*/ private $updater; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder('\OCP\IConfig') ->disableOriginalConstructor() diff --git a/tests/lib/UpdaterTest.php b/tests/lib/UpdaterTest.php index 7d83ea58f410..c8c5d55b99af 100644 --- a/tests/lib/UpdaterTest.php +++ b/tests/lib/UpdaterTest.php @@ -37,7 +37,7 @@ class UpdaterTest extends TestCase { /** @var Checker | \PHPUnit\Framework\MockObject\MockObject */ private $checker; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) ->disableOriginalConstructor() diff --git a/tests/lib/UrlGeneratorTest.php b/tests/lib/UrlGeneratorTest.php index 32ef5a09b6eb..29f474a40c30 100644 --- a/tests/lib/UrlGeneratorTest.php +++ b/tests/lib/UrlGeneratorTest.php @@ -27,7 +27,7 @@ class UrlGeneratorTest extends TestCase { /** @var EnvironmentHelper | \PHPUnit\Framework\MockObject\MockObject */ private $environmentHelper; - public function setUp() { + public function setUp(): void { parent::setUp(); $config = $this->createMock(IConfig::class); $cacheFactory = $this->createMock(ICacheFactory::class); diff --git a/tests/lib/User/AccountMapperTest.php b/tests/lib/User/AccountMapperTest.php index a0efe85d28b0..00e7906a8f3b 100644 --- a/tests/lib/User/AccountMapperTest.php +++ b/tests/lib/User/AccountMapperTest.php @@ -72,7 +72,7 @@ public static function setUpBeforeClass() { } } - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); @@ -86,7 +86,7 @@ public function setUp() { ); } - public static function tearDownAfterClass() { + public static function tearDownAfterClass(): void { \OC::$server->getDatabaseConnection()->rollBack(); parent::tearDownAfterClass(); } diff --git a/tests/lib/User/BasicAuthModuleTest.php b/tests/lib/User/BasicAuthModuleTest.php index 05c1ffef5e65..3c63fc40a429 100644 --- a/tests/lib/User/BasicAuthModuleTest.php +++ b/tests/lib/User/BasicAuthModuleTest.php @@ -49,7 +49,7 @@ class BasicAuthModuleTest extends TestCase { /** @var ISession | \PHPUnit\Framework\MockObject\MockObject */ private $session; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); $this->logger = $this->createMock(ILogger::class); diff --git a/tests/lib/User/DatabaseTest.php b/tests/lib/User/DatabaseTest.php index 5ff0d46d3af6..deedc113b77a 100644 --- a/tests/lib/User/DatabaseTest.php +++ b/tests/lib/User/DatabaseTest.php @@ -39,12 +39,12 @@ public function getUser($prefix = 'test_') { return $user; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->backend = new \OC\User\Database(); } - protected function tearDown() { + protected function tearDown(): void { if (!isset($this->users)) { return; } diff --git a/tests/lib/User/DummyTestCase.php b/tests/lib/User/DummyTestCase.php index b53f8cfda3dd..b05950390960 100644 --- a/tests/lib/User/DummyTestCase.php +++ b/tests/lib/User/DummyTestCase.php @@ -25,7 +25,7 @@ use Test\Util\User\Dummy; class DummyTestCase extends BackendTestCase { - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->backend = new Dummy(); } diff --git a/tests/lib/User/ManagerTest.php b/tests/lib/User/ManagerTest.php index cd7bc5a305ef..5f76f5f94619 100644 --- a/tests/lib/User/ManagerTest.php +++ b/tests/lib/User/ManagerTest.php @@ -44,7 +44,7 @@ class ManagerTest extends TestCase { */ protected $userSearch; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->overwriteService('EventDispatcher', new EventDispatcher()); diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index d415bd7c57d2..a008eebbc485 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -61,7 +61,7 @@ class SessionTest extends TestCase { /** @var EventDispatcher */ protected $eventDispatcher; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->timeFactory = $this->createMock(ITimeFactory::class); diff --git a/tests/lib/User/Sync/AllUsersIteratorTest.php b/tests/lib/User/Sync/AllUsersIteratorTest.php index 5234cb90e029..7a5ccc2f23d7 100644 --- a/tests/lib/User/Sync/AllUsersIteratorTest.php +++ b/tests/lib/User/Sync/AllUsersIteratorTest.php @@ -42,7 +42,7 @@ class AllUsersIteratorTest extends TestCase { */ private $iterator; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->backend = $this->createMock(UserInterface::class); diff --git a/tests/lib/User/Sync/SeenUsersIteratorTest.php b/tests/lib/User/Sync/SeenUsersIteratorTest.php index c43050f1b059..d2287366a526 100644 --- a/tests/lib/User/Sync/SeenUsersIteratorTest.php +++ b/tests/lib/User/Sync/SeenUsersIteratorTest.php @@ -44,7 +44,7 @@ class SeenUsersIteratorTest extends TestCase { const TEST_BACKEND = 'TestBackend'; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->mapper = $this->createMock(AccountMapper::class); diff --git a/tests/lib/User/SyncServiceTest.php b/tests/lib/User/SyncServiceTest.php index 4ef338194de2..d81380209f6d 100644 --- a/tests/lib/User/SyncServiceTest.php +++ b/tests/lib/User/SyncServiceTest.php @@ -47,7 +47,7 @@ class SyncServiceTest extends TestCase { /** @var AccountMapper | \PHPUnit\Framework\MockObject\MockObject */ private $mapper; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/User/TokenAuthModuleTest.php b/tests/lib/User/TokenAuthModuleTest.php index 2098ded4f556..06e6008fdfee 100644 --- a/tests/lib/User/TokenAuthModuleTest.php +++ b/tests/lib/User/TokenAuthModuleTest.php @@ -45,7 +45,7 @@ class TokenAuthModuleTest extends TestCase { /** @var IProvider | \PHPUnit\Framework\MockObject\MockObject */ private $tokenProvider; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->manager = $this->createMock(IUserManager::class); $this->session = $this->createMock(ISession::class); diff --git a/tests/lib/User/UserTest.php b/tests/lib/User/UserTest.php index b17c568d6343..bb81ce8ff16e 100644 --- a/tests/lib/User/UserTest.php +++ b/tests/lib/User/UserTest.php @@ -55,7 +55,7 @@ class UserTest extends TestCase { /** @var Session | \PHPUnit\Framework\MockObject\MockObject */ private $sessionUser; - public function setUp() { + public function setUp(): void { parent::setUp(); $this->accountMapper = $this->createMock(AccountMapper::class); $this->config = $this->createMock(IConfig::class); diff --git a/tests/lib/UtilCheckServerTest.php b/tests/lib/UtilCheckServerTest.php index dadcef5f8c9e..5cf6f5fa0938 100644 --- a/tests/lib/UtilCheckServerTest.php +++ b/tests/lib/UtilCheckServerTest.php @@ -34,7 +34,7 @@ protected function getConfig($systemOptions) { return $config; } - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->datadir = \OC::$server->getTempManager()->getTemporaryFolder(); @@ -43,7 +43,7 @@ protected function setUp() { \OC::$server->getSession()->set('checkServer_succeeded', false); } - protected function tearDown() { + protected function tearDown(): void { // clean up @\unlink($this->datadir . '/.ocdata'); parent::tearDown(); diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php index 841aa60f2f68..773575fedb8d 100644 --- a/tests/lib/UtilTest.php +++ b/tests/lib/UtilTest.php @@ -425,13 +425,13 @@ public function testCopySkeletonDirectoryNoReadAccessToFile() { $config->deleteSystemValue('skeletondirectory'); } - protected function setUp() { + protected function setUp(): void { parent::setUp(); \OC_Util::$scripts = []; \OC_Util::$styles = []; } - protected function tearDown() { + protected function tearDown(): void { parent::tearDown(); \OC_Util::$scripts = []; diff --git a/tests/lib/legacy/AppTest.php b/tests/lib/legacy/AppTest.php index 9e6be33f5683..d1290bb53df5 100644 --- a/tests/lib/legacy/AppTest.php +++ b/tests/lib/legacy/AppTest.php @@ -28,7 +28,7 @@ class AppTest extends TestCase { private $appPath; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appPath = __DIR__ . '/../../../apps/appinfotestapp'; @@ -43,7 +43,7 @@ protected function setUp() { \file_put_contents($infoXmlPath, $xml); } - protected function tearDown() { + protected function tearDown(): void { $this->restoreService('NavigationManager'); \OC::$server->getAppManager()->clearAppsCache(); if (\is_dir($this->appPath)) { From bc2318c92a528fb7fb87d418bbf7876be309472c Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 30 Nov 2019 19:46:49 +0545 Subject: [PATCH 05/15] Remove undeclared property in -PHPUnit\Framework\Error\Deprecated --- tests/bootstrap.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 0a08748f2cdb..432f8463b778 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -26,6 +26,4 @@ // load all enabled apps \OC_App::loadApps(); -PHPUnit\Framework\Error\Deprecated::$enabled = false; - OC_Hook::clear(); From 770f436fecd9ab861ad025bf73fe28dede1ee0c1 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 30 Nov 2019 22:32:25 +0545 Subject: [PATCH 06/15] setUpBeforeClass(): void --- apps/federatedfilesharing/tests/TestCase.php | 2 +- apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php | 2 +- apps/files_sharing/tests/PropagationTestCase.php | 2 +- apps/files_sharing/tests/TestCase.php | 2 +- apps/files_sharing/tests/UpdaterTest.php | 2 +- apps/files_trashbin/tests/TrashbinTest.php | 2 +- apps/files_versions/tests/VersioningTest.php | 2 +- tests/lib/DB/ConnectionTest.php | 2 +- tests/lib/DateTimeFormatterTest.php | 2 +- tests/lib/Memcache/MemcachedTest.php | 2 +- tests/lib/Memcache/RedisTest.php | 2 +- tests/lib/StreamWrappersTest.php | 2 +- tests/lib/User/AccountMapperTest.php | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/federatedfilesharing/tests/TestCase.php b/apps/federatedfilesharing/tests/TestCase.php index b38498062527..eff7d0b20cc9 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 diff --git a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php index d5ff9402c8d7..f9849f200079 100644 --- a/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php +++ b/apps/files_sharing/tests/DeleteOrphanedSharesJobTest.php @@ -59,7 +59,7 @@ class DeleteOrphanedSharesJobTest extends \Test\TestCase { */ private $user2; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { $appManager = \OC::$server->getAppManager(); self::$trashBinStatus = $appManager->isEnabledForUser('files_trashbin'); $appManager->disableApp('files_trashbin'); diff --git a/apps/files_sharing/tests/PropagationTestCase.php b/apps/files_sharing/tests/PropagationTestCase.php index 6d16de929500..7e5bcfc7a812 100644 --- a/apps/files_sharing/tests/PropagationTestCase.php +++ b/apps/files_sharing/tests/PropagationTestCase.php @@ -30,7 +30,7 @@ abstract class PropagationTestCase extends TestCase { protected $fileIds = []; // [$user=>[$path=>$id]] protected $fileEtags = []; // [$id=>$etag] - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); \OCA\Files_Sharing\Helper::registerHooks(); } diff --git a/apps/files_sharing/tests/TestCase.php b/apps/files_sharing/tests/TestCase.php index d95834d4c6f0..b93c67703d48 100644 --- a/apps/files_sharing/tests/TestCase.php +++ b/apps/files_sharing/tests/TestCase.php @@ -71,7 +71,7 @@ abstract class TestCase extends \Test\TestCase { private static $alreadyRegistered = false; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); if (!self::$alreadyRegistered) { diff --git a/apps/files_sharing/tests/UpdaterTest.php b/apps/files_sharing/tests/UpdaterTest.php index fcade7cb87f0..955e3b316cdb 100644 --- a/apps/files_sharing/tests/UpdaterTest.php +++ b/apps/files_sharing/tests/UpdaterTest.php @@ -37,7 +37,7 @@ class UpdaterTest extends TestCase { const TEST_FOLDER_NAME = '/folder_share_updater_test'; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); \OCA\Files_Sharing\Helper::registerHooks(); } diff --git a/apps/files_trashbin/tests/TrashbinTest.php b/apps/files_trashbin/tests/TrashbinTest.php index cd55f758417b..b997115c5228 100644 --- a/apps/files_trashbin/tests/TrashbinTest.php +++ b/apps/files_trashbin/tests/TrashbinTest.php @@ -69,7 +69,7 @@ class TrashbinTest extends TestCase { */ private $rootView; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); $appManager = \OC::$server->getAppManager(); diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php index 03414648db2c..9bdbbc5cf1b3 100644 --- a/apps/files_versions/tests/VersioningTest.php +++ b/apps/files_versions/tests/VersioningTest.php @@ -61,7 +61,7 @@ class VersioningTest extends TestCase { */ private $rootView; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); $application = new \OCA\Files_Sharing\AppInfo\Application(); diff --git a/tests/lib/DB/ConnectionTest.php b/tests/lib/DB/ConnectionTest.php index 772533dd20f6..3aac3f362c97 100644 --- a/tests/lib/DB/ConnectionTest.php +++ b/tests/lib/DB/ConnectionTest.php @@ -27,7 +27,7 @@ class ConnectionTest extends \Test\TestCase { */ private $connection; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { self::dropTestTable(); parent::setUpBeforeClass(); } diff --git a/tests/lib/DateTimeFormatterTest.php b/tests/lib/DateTimeFormatterTest.php index 169413bdc8e0..0e8ac6dcbe22 100644 --- a/tests/lib/DateTimeFormatterTest.php +++ b/tests/lib/DateTimeFormatterTest.php @@ -18,7 +18,7 @@ class DateTimeFormatterTest extends TestCase { protected static $defaultTimeZone; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); self::$defaultTimeZone = \date_default_timezone_get(); \date_default_timezone_set('UTC'); diff --git a/tests/lib/Memcache/MemcachedTest.php b/tests/lib/Memcache/MemcachedTest.php index b50a88503416..4c2c563dbaec 100644 --- a/tests/lib/Memcache/MemcachedTest.php +++ b/tests/lib/Memcache/MemcachedTest.php @@ -10,7 +10,7 @@ namespace Test\Memcache; class MemcachedTest extends Cache { - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); if (!\OC\Memcache\Memcached::isAvailable()) { diff --git a/tests/lib/Memcache/RedisTest.php b/tests/lib/Memcache/RedisTest.php index 88e8ed76971c..499fa544806c 100644 --- a/tests/lib/Memcache/RedisTest.php +++ b/tests/lib/Memcache/RedisTest.php @@ -10,7 +10,7 @@ namespace Test\Memcache; class RedisTest extends Cache { - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); if (!\OC\Memcache\Redis::isAvailable()) { diff --git a/tests/lib/StreamWrappersTest.php b/tests/lib/StreamWrappersTest.php index 19ab8d2e0404..5ad1251a2572 100644 --- a/tests/lib/StreamWrappersTest.php +++ b/tests/lib/StreamWrappersTest.php @@ -30,7 +30,7 @@ class StreamWrappersTest extends \Test\TestCase { private static $trashBinStatus; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { self::$trashBinStatus = \OC_App::isEnabled('files_trashbin'); \OC_App::disable('files_trashbin'); } diff --git a/tests/lib/User/AccountMapperTest.php b/tests/lib/User/AccountMapperTest.php index 00e7906a8f3b..78201277490c 100644 --- a/tests/lib/User/AccountMapperTest.php +++ b/tests/lib/User/AccountMapperTest.php @@ -46,7 +46,7 @@ class AccountMapperTest extends TestCase { /** @var AccountMapper */ protected $mapper; - public static function setUpBeforeClass() { + public static function setUpBeforeClass(): void { parent::setUpBeforeClass(); $mapper = \OC::$server->getAccountMapper(); From ca6ce232eca6a58a68ebdd6a37618e3d068bb52a Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sun, 1 Dec 2019 09:49:03 +0545 Subject: [PATCH 07/15] Adjust phpunit expectException --- .../tests/unit/Dav/CommentsNodeTest.php | 25 ++-- .../tests/unit/Dav/CommentsPluginTest.php | 23 ++-- .../tests/unit/Dav/EntityCollectionTest.php | 3 +- .../unit/Dav/EntityTypeCollectionTest.php | 6 +- .../tests/unit/Dav/RootCollectionTest.php | 24 ++-- .../dav/tests/unit/Avatars/AvatarHomeTest.php | 3 +- apps/dav/tests/unit/CalDAV/CalendarTest.php | 3 +- .../unit/CalDAV/PublicCalendarRootTest.php | 3 +- .../tests/unit/CardDAV/AddressBookTest.php | 6 +- .../tests/unit/CardDAV/CardDavBackendTest.php | 6 +- .../tests/unit/Connector/Sabre/AuthTest.php | 11 +- .../Sabre/BlockLegacyClientPluginTest.php | 5 +- .../unit/Connector/Sabre/DirectoryTest.php | 52 +++++--- .../tests/unit/Connector/Sabre/FileTest.php | 44 +++--- .../unit/Connector/Sabre/FilesPluginTest.php | 13 +- .../Connector/Sabre/FilesReportPluginTest.php | 3 +- .../Sabre/FilesSearchReportPluginTest.php | 6 +- .../Connector/Sabre/MaintenancePluginTest.php | 10 +- .../unit/Connector/Sabre/ObjectTreeTest.php | 6 +- .../unit/Connector/Sabre/PrincipalTest.php | 15 ++- .../unit/Connector/Sabre/QuotaPluginTest.php | 6 +- .../Sabre/RequestTest/DownloadTest.php | 3 +- .../Sabre/RequestTest/UploadTest.php | 12 +- .../Sabre/ValidateRequestPluginTest.php | 10 +- apps/dav/tests/unit/DAV/CopyPluginTest.php | 5 +- .../dav/tests/unit/DAV/GroupPrincipalTest.php | 5 +- apps/dav/tests/unit/DAV/LockPluginTest.php | 3 +- .../unit/DAV/SystemPrincipalBackendTest.php | 10 +- .../tests/unit/Files/FileLocksBackendTest.php | 6 +- apps/dav/tests/unit/Files/FilesHomeTest.php | 10 +- .../PublicFiles/PublicSharedRootNodeTest.php | 3 +- .../JobStatus/Entity/JobStatusMapperTest.php | 3 +- apps/dav/tests/unit/JobStatus/HomeTest.php | 6 +- .../SystemTag/SystemTagMappingNodeTest.php | 6 +- .../unit/SystemTag/SystemTagNodeTest.php | 18 ++- .../unit/SystemTag/SystemTagPluginTest.php | 17 ++- .../SystemTagsByIdCollectionTest.php | 18 ++- .../SystemTagsObjectMappingCollectionTest.php | 32 +++-- .../SystemTagsObjectTypeCollectionTest.php | 18 ++- .../tests/unit/TrashBin/TrashBinFileTest.php | 15 ++- .../unit/TrashBin/TrashBinFolderTest.php | 15 ++- .../tests/unit/TrashBin/TrashBinHomeTest.php | 5 +- .../tests/unit/Upload/ChunkingPluginTest.php | 5 +- apps/dav/tests/unit/Upload/FutureFileTest.php | 6 +- .../tests/AddressHandlerTest.php | 3 +- .../Controller/SettingsControllerTest.php | 6 +- apps/federation/tests/TrustedServersTest.php | 10 +- apps/files/tests/ActivityHelperTest.php | 15 ++- .../tests/Storage/SFTP_KeyTest.php | 12 +- apps/files_sharing/tests/API/ShareesTest.php | 3 +- apps/files_sharing/tests/ApiTest.php | 6 +- .../tests/Controllers/ShareControllerTest.php | 6 +- apps/files_sharing/tests/LockingTest.php | 3 +- .../Middleware/SharingCheckMiddlewareTest.php | 15 ++- apps/files_sharing/tests/NotifierTest.php | 12 +- apps/files_versions/tests/VersioningTest.php | 3 +- tests/Core/Command/Apps/CheckCodeTest.php | 3 +- .../Command/Config/System/SetConfigTest.php | 6 +- tests/Core/Command/Db/ConvertTypeTest.php | 3 +- .../Encryption/ChangeKeyStorageRootTest.php | 11 +- .../Command/Encryption/DecryptAllTest.php | 3 +- .../Command/Encryption/EncryptAllTest.php | 3 +- tests/Core/Command/Log/ManageTest.php | 12 +- .../AccountModuleMiddlewareTest.php | 11 +- .../Middleware/TwoFactorMiddlewareTest.php | 6 +- .../Middleware/SubadminMiddlewareTest.php | 6 +- tests/lib/Activity/ManagerTest.php | 37 ++--- .../lib/Activity/NullSession/ManagerTest.php | 37 ++--- tests/lib/AllConfigTest.php | 6 +- tests/lib/App/InfoParserTest.php | 6 +- tests/lib/App/ManagerTest.php | 11 +- .../Controller/ControllerTest.php | 3 +- .../AppFramework/Http/JSONResponseTest.php | 5 +- tests/lib/AppFramework/Http/RequestTest.php | 22 +-- .../Security/CORSMiddlewareTest.php | 8 +- .../Security/SecurityMiddlewareTest.php | 3 +- .../lib/AppFramework/Routing/RoutingTest.php | 3 +- .../Utility/SimpleContainerTest.php | 9 +- .../Token/DefaultTokenMapperTest.php | 9 +- .../Token/DefaultTokenProviderTest.php | 9 +- .../TwoFactorAuth/ManagerTest.php | 5 +- tests/lib/AvatarManagerTest.php | 5 +- tests/lib/CapabilitiesManagerTest.php | 5 +- tests/lib/Command/User/SyncBackendTest.php | 3 +- tests/lib/Comments/CommentTest.php | 12 +- tests/lib/Comments/ManagerTest.php | 30 +++-- tests/lib/DB/ConnectionTest.php | 3 +- tests/lib/DB/LegacyDBTest.php | 3 +- tests/lib/DB/MigrationsTest.php | 15 ++- tests/lib/DateTimeFormatterTest.php | 3 +- tests/lib/Encryption/ManagerTest.php | 10 +- tests/lib/Encryption/UtilTest.php | 3 +- tests/lib/Files/Cache/ScannerTest.php | 10 +- .../Auth/Password/SessionCredentialsTest.php | 3 +- .../lib/Files/External/InvalidStorageTest.php | 3 +- .../External/Service/StoragesServiceTest.php | 9 +- .../Service/UserGlobalStoragesServiceTest.php | 15 ++- .../Service/UserStoragesServiceTest.php | 3 +- tests/lib/Files/FilesystemTest.php | 6 +- tests/lib/Files/MetaFilesTest.php | 3 +- tests/lib/Files/MetaVersionCollectionTest.php | 6 +- tests/lib/Files/Node/AbstractFileTest.php | 3 +- tests/lib/Files/Node/AbstractFolderTest.php | 3 +- tests/lib/Files/Node/AbstractNodeTest.php | 3 +- tests/lib/Files/Node/FileTest.php | 15 ++- tests/lib/Files/Node/FolderTest.php | 6 +- tests/lib/Files/Node/NodeTest.php | 33 +++-- tests/lib/Files/Node/RootTest.php | 12 +- .../lib/Files/ObjectStore/ObjectStoreTest.php | 3 +- tests/lib/Files/PathVerificationTest.php | 18 ++- tests/lib/Files/Storage/DavTest.php | 60 ++++++--- tests/lib/Files/Storage/FolderTest.php | 24 ++-- tests/lib/Files/Storage/LocalTest.php | 12 +- tests/lib/Files/Storage/NodeTest.php | 39 ++++-- .../Storage/Wrapper/AvailabilityTest.php | 9 +- tests/lib/Files/Utils/ScannerTest.php | 5 +- tests/lib/Files/ViewTest.php | 24 ++-- tests/lib/Hooks/BasicEmitterTest.php | 27 ++-- tests/lib/Image/BmpToResourceTest.php | 9 +- tests/lib/IntegrityCheck/CheckerTest.php | 6 +- .../IntegrityCheck/Helpers/AppLocatorTest.php | 5 +- tests/lib/LargeFileHelperTest.php | 3 +- tests/lib/Lock/LockingProvider.php | 27 ++-- tests/lib/Lock/Persistent/LockManagerTest.php | 10 +- tests/lib/Lock/Persistent/LockMapperTest.php | 3 +- tests/lib/Mail/MailerTest.php | 3 +- tests/lib/Memcache/FactoryTest.php | 3 +- tests/lib/Notification/ActionTest.php | 12 +- tests/lib/Notification/ManagerTest.php | 26 ++-- tests/lib/Notification/NotificationTest.php | 36 +++-- .../CSRF/TokenStorage/SessionStorageTest.php | 5 +- tests/lib/Security/CertificateManagerTest.php | 10 +- tests/lib/Security/CertificateTest.php | 10 +- tests/lib/Security/CryptoTest.php | 15 ++- tests/lib/Session/MemoryTest.php | 3 +- tests/lib/SetupTest.php | 15 ++- tests/lib/Share/HelperTest.php | 3 +- tests/lib/Share/MailNotificationsTest.php | 6 +- tests/lib/Share/ShareTest.php | 29 ++-- .../lib/Share20/DefaultShareProviderTest.php | 31 +++-- tests/lib/Share20/ManagerTest.php | 126 +++++++++++------- tests/lib/Share20/ShareTest.php | 20 +-- tests/lib/SystemTag/SystemTagManagerTest.php | 18 ++- .../SystemTag/SystemTagObjectMapperTest.php | 15 ++- tests/lib/User/BasicAuthModuleTest.php | 3 +- tests/lib/User/DatabaseTest.php | 5 +- tests/lib/User/SessionTest.php | 17 ++- tests/lib/User/SyncServiceTest.php | 3 +- tests/lib/User/UserTest.php | 5 +- tests/lib/UtilTest.php | 18 ++- tests/lib/legacy/AppTest.php | 3 +- 151 files changed, 1140 insertions(+), 644 deletions(-) diff --git a/apps/comments/tests/unit/Dav/CommentsNodeTest.php b/apps/comments/tests/unit/Dav/CommentsNodeTest.php index aad4cb2e29b5..37a25f9c24aa 100644 --- a/apps/comments/tests/unit/Dav/CommentsNodeTest.php +++ b/apps/comments/tests/unit/Dav/CommentsNodeTest.php @@ -84,9 +84,10 @@ public function testDelete() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testDeleteForbidden() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $user = $this->createMock('\OCP\IUser'); $user->expects($this->once()) @@ -124,9 +125,10 @@ public function testGetName() { } /** - * @expectedException \Sabre\DAV\Exception\MethodNotAllowed */ public function testSetName() { + $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); + $this->node->setName('666'); } @@ -167,10 +169,11 @@ public function testUpdateComment() { } /** - * @expectedException Exception - * @expectedExceptionMessage buh! */ public function testUpdateCommentLogException() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('buh!'); + $msg = null; $user = $this->createMock('\OCP\IUser'); @@ -206,10 +209,11 @@ public function testUpdateCommentLogException() { } /** - * @expectedException \Sabre\DAV\Exception\BadRequest - * @expectedExceptionMessage Message exceeds allowed character limit of */ public function testUpdateCommentMessageTooLongException() { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $this->expectExceptionMessage('Message exceeds allowed character limit of'); + $user = $this->createMock('\OCP\IUser'); $user->expects($this->once()) @@ -243,9 +247,10 @@ public function testUpdateCommentMessageTooLongException() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testUpdateForbiddenByUser() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $msg = 'HaXX0r'; $user = $this->createMock('\OCP\IUser'); @@ -276,9 +281,10 @@ public function testUpdateForbiddenByUser() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testUpdateForbiddenByType() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $msg = 'HaXX0r'; $user = $this->createMock('\OCP\IUser'); @@ -304,9 +310,10 @@ public function testUpdateForbiddenByType() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testUpdateForbiddenByNotLoggedIn() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $msg = 'HaXX0r'; $this->userSession->expects($this->once()) diff --git a/apps/comments/tests/unit/Dav/CommentsPluginTest.php b/apps/comments/tests/unit/Dav/CommentsPluginTest.php index b18bb98ea995..400720e4523a 100644 --- a/apps/comments/tests/unit/Dav/CommentsPluginTest.php +++ b/apps/comments/tests/unit/Dav/CommentsPluginTest.php @@ -155,9 +155,10 @@ public function testCreateComment() { } /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testCreateCommentInvalidObject() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $commentData = [ 'actorType' => 'users', 'verb' => 'comment', @@ -235,9 +236,10 @@ public function testCreateCommentInvalidObject() { } /** - * @expectedException \Sabre\DAV\Exception\BadRequest */ public function testCreateCommentInvalidActor() { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $commentData = [ 'actorType' => 'robots', 'verb' => 'comment', @@ -321,9 +323,10 @@ public function testCreateCommentInvalidActor() { } /** - * @expectedException \Sabre\DAV\Exception\UnsupportedMediaType */ public function testCreateCommentUnsupportedMediaType() { + $this->expectException(\Sabre\DAV\Exception\UnsupportedMediaType::class); + $commentData = [ 'actorType' => 'users', 'verb' => 'comment', @@ -407,9 +410,10 @@ public function testCreateCommentUnsupportedMediaType() { } /** - * @expectedException \Sabre\DAV\Exception\BadRequest */ public function testCreateCommentInvalidPayload() { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $commentData = [ 'actorType' => 'users', 'verb' => '', @@ -499,10 +503,11 @@ public function testCreateCommentInvalidPayload() { } /** - * @expectedException \Sabre\DAV\Exception\BadRequest - * @expectedExceptionMessage Message exceeds allowed character limit of */ public function testCreateCommentMessageTooLong() { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $this->expectExceptionMessage('Message exceeds allowed character limit of'); + $commentData = [ 'actorType' => 'users', 'verb' => 'comment', @@ -591,9 +596,10 @@ public function testCreateCommentMessageTooLong() { } /** - * @expectedException \Sabre\DAV\Exception\ReportNotSupported */ public function testOnReportInvalidNode() { + $this->expectException(\Sabre\DAV\Exception\ReportNotSupported::class); + $path = 'totally/unrelated/13'; $this->tree->expects($this->any()) @@ -610,9 +616,10 @@ public function testOnReportInvalidNode() { } /** - * @expectedException \Sabre\DAV\Exception\ReportNotSupported */ public function testOnReportInvalidReportName() { + $this->expectException(\Sabre\DAV\Exception\ReportNotSupported::class); + $path = 'comments/files/42'; $this->tree->expects($this->any()) diff --git a/apps/comments/tests/unit/Dav/EntityCollectionTest.php b/apps/comments/tests/unit/Dav/EntityCollectionTest.php index 4eea2e68f24c..637a93ddb34d 100644 --- a/apps/comments/tests/unit/Dav/EntityCollectionTest.php +++ b/apps/comments/tests/unit/Dav/EntityCollectionTest.php @@ -81,9 +81,10 @@ public function testGetChild(): void { } /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testGetChildException(): void { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $this->commentsManager->expects($this->once()) ->method('get') ->with('55') diff --git a/apps/comments/tests/unit/Dav/EntityTypeCollectionTest.php b/apps/comments/tests/unit/Dav/EntityTypeCollectionTest.php index 3bd33c150b19..ad70bf6cf08a 100644 --- a/apps/comments/tests/unit/Dav/EntityTypeCollectionTest.php +++ b/apps/comments/tests/unit/Dav/EntityTypeCollectionTest.php @@ -89,16 +89,18 @@ public function testGetChild() { } /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testGetChildException() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $this->collection->getChild('17'); } /** - * @expectedException \Sabre\DAV\Exception\MethodNotAllowed */ public function testGetChildren() { + $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); + $this->collection->getChildren(); } } diff --git a/apps/comments/tests/unit/Dav/RootCollectionTest.php b/apps/comments/tests/unit/Dav/RootCollectionTest.php index 2c15a8e92ef3..cba32f419623 100644 --- a/apps/comments/tests/unit/Dav/RootCollectionTest.php +++ b/apps/comments/tests/unit/Dav/RootCollectionTest.php @@ -82,16 +82,18 @@ protected function prepareForInitCollections() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testCreateFile() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->collection->createFile('foo'); } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testCreateDirectory() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->collection->createDirectory('foo'); } @@ -102,17 +104,19 @@ public function testGetChild() { } /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testGetChildInvalid() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $this->prepareForInitCollections(); $this->collection->getChild('robots'); } /** - * @expectedException \Sabre\DAV\Exception\NotAuthenticated */ public function testGetChildNoAuth() { + $this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class); + $this->collection->getChild('files'); } @@ -126,9 +130,10 @@ public function testGetChildren() { } /** - * @expectedException \Sabre\DAV\Exception\NotAuthenticated */ public function testGetChildrenNoAuth() { + $this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class); + $this->collection->getChildren(); } @@ -143,16 +148,18 @@ public function testChildExistsNo() { } /** - * @expectedException \Sabre\DAV\Exception\NotAuthenticated */ public function testChildExistsNoAuth() { + $this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class); + $this->collection->childExists('files'); } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testDelete() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->collection->delete(); } @@ -161,9 +168,10 @@ public function testGetName() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testSetName() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->collection->setName('foobar'); } diff --git a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php index 7a34ebc77ffb..08bfc960b3b1 100644 --- a/apps/dav/tests/unit/Avatars/AvatarHomeTest.php +++ b/apps/dav/tests/unit/Avatars/AvatarHomeTest.php @@ -43,10 +43,11 @@ public function setUp(): void { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden * @dataProvider providesForbiddenMethods */ public function testForbiddenMethods($method) { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->home->$method(''); } diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php index b90d1f3537f7..b554f73d9a57 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php @@ -66,9 +66,10 @@ public function testDelete() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testDeleteFromGroup() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + /** @var \PHPUnit\Framework\MockObject\MockObject | CalDavBackend $backend */ $backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock(); $backend->expects($this->never())->method('updateShares'); diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php index d393dd181887..507a5f5860d0 100644 --- a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php +++ b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php @@ -112,9 +112,10 @@ public function testGetChild() { } /** - * @expectedException \Sabre\DAV\Exception\MethodNotAllowed */ public function testGetChildren() { + $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); + $this->createPublicCalendar(); $this->publicCalendarRoot->disableListing = true; diff --git a/apps/dav/tests/unit/CardDAV/AddressBookTest.php b/apps/dav/tests/unit/CardDAV/AddressBookTest.php index da7ab6b4232d..e89412ea8cb0 100644 --- a/apps/dav/tests/unit/CardDAV/AddressBookTest.php +++ b/apps/dav/tests/unit/CardDAV/AddressBookTest.php @@ -45,9 +45,10 @@ public function testDelete() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testDeleteFromGroup() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + /** @var \PHPUnit\Framework\MockObject\MockObject | CardDavBackend $backend */ $backend = $this->getMockBuilder('OCA\DAV\CardDAV\CardDavBackend')->disableOriginalConstructor()->getMock(); $backend->expects($this->never())->method('updateShares'); @@ -64,9 +65,10 @@ public function testDeleteFromGroup() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testPropPatch() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + /** @var \PHPUnit\Framework\MockObject\MockObject | CardDavBackend $backend */ $backend = $this->getMockBuilder('OCA\DAV\CardDAV\CardDavBackend')->disableOriginalConstructor()->getMock(); $calendarInfo = [ diff --git a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php index db837faa3e9a..4b6babc61994 100644 --- a/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php +++ b/apps/dav/tests/unit/CardDAV/CardDavBackendTest.php @@ -472,9 +472,10 @@ public function testGetCardId() { } /** - * @expectedException InvalidArgumentException */ public function testGetCardIdFailed() { + $this->expectException(\InvalidArgumentException::class); + static::invokePrivate($this->backend, 'getCardId', [1, 'uri']); } @@ -598,9 +599,10 @@ public function testGetCardUri() { } /** - * @expectedException InvalidArgumentException */ public function testGetCardUriFailed() { + $this->expectException(\InvalidArgumentException::class); + $this->backend->getCardUri(1); } diff --git a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php index 8fbf928d8e0a..4679682aacfd 100644 --- a/apps/dav/tests/unit/Connector/Sabre/AuthTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/AuthTest.php @@ -228,9 +228,10 @@ public function testValidateUserPassWithInvalidPassword() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\PasswordLoginForbidden */ public function testValidateUserPassWithPasswordLoginForbidden() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\PasswordLoginForbidden::class); + $this->userSession ->expects($this->once()) ->method('isLoggedIn') @@ -332,10 +333,11 @@ public function testAuthenticateAlreadyLoggedInWithoutCsrfTokenAndCorrectlyDavAu } /** - * @expectedException \Sabre\DAV\Exception\NotAuthenticated - * @expectedExceptionMessage 2FA challenge not passed. */ public function testAuthenticateAlreadyLoggedInWithoutTwoFactorChallengePassed() { + $this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class); + $this->expectExceptionMessage('2FA challenge not passed.'); + /** @var RequestInterface | MockObject $request */ $request = $this->getMockBuilder(RequestInterface::class) ->disableOriginalConstructor() @@ -493,9 +495,10 @@ public function testAuthenticateAlreadyLoggedInWithCsrfTokenForGet() { } /** - * @expectedException \Sabre\DAV\Exception\NotAuthenticated */ public function testAutenticateWithLoggedInUserButLoginExceptionThrown() { + $this->expectException(\Sabre\DAV\Exception\NotAuthenticated::class); + /** @var RequestInterface | MockObject $request */ $request = $this->getMockBuilder(RequestInterface::class) ->disableOriginalConstructor() diff --git a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php index 507c330d848b..1e7f9932703b 100644 --- a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php @@ -62,10 +62,11 @@ public function oldDesktopClientProvider() { /** * @dataProvider oldDesktopClientProvider * @param string $userAgent - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage Unsupported client version. */ public function testBeforeHandlerException($userAgent) { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('Unsupported client version.'); + /** @var \Sabre\HTTP\RequestInterface | PHPUnit\Framework\MockObject\MockObject $request */ $request = $this->createMock('\Sabre\HTTP\RequestInterface'); $request diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php index ea246c5c6f9b..6900f4a5ad58 100644 --- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php @@ -115,9 +115,10 @@ public function testChildExists($exists) { } /** - * @expectedException \Sabre\DAV\Exception\ServiceUnavailable */ public function testChildExistsStorageNotAvailable() { + $this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class); + $this->view->method('file_exists') ->will($this->throwException(new StorageNotAvailableException())); $dir = $this->getDir(); @@ -125,9 +126,10 @@ public function testChildExistsStorageNotAvailable() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testDeleteRootFolderFails() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->info->expects($this->any()) ->method('isDeletable') ->will($this->returnValue(true)); @@ -138,9 +140,10 @@ public function testDeleteRootFolderFails() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testDeleteForbidden() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + // deletion allowed $this->info->expects($this->once()) ->method('isDeletable') @@ -176,9 +179,10 @@ public function testDeleteFolderWhenAllowed() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testDeleteFolderFailsWhenNotAllowed() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->info->expects($this->once()) ->method('isDeletable') ->will($this->returnValue(false)); @@ -188,9 +192,10 @@ public function testDeleteFolderFailsWhenNotAllowed() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testDeleteFolderThrowsWhenDeletionFailed() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + // deletion allowed $this->info->expects($this->once()) ->method('isDeletable') @@ -207,9 +212,10 @@ public function testDeleteFolderThrowsWhenDeletionFailed() { } /** - * @expectedException \Sabre\DAV\Exception\ServiceUnavailable */ public function testDeleteFolderThrowsWhenStorageNotAvailable() { + $this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class); + // deletion allowed $this->info->expects($this->once()) ->method('isDeletable') @@ -265,9 +271,10 @@ public function testGetChildren() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testGetChildrenNoPermission() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $info = $this->getMockBuilder('OC\Files\FileInfo') ->disableOriginalConstructor() ->getMock(); @@ -280,9 +287,10 @@ public function testGetChildrenNoPermission() { } /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testGetChildNoPermission() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $info = $this->getMockBuilder('OC\Files\FileInfo') ->disableOriginalConstructor() ->getMock(); @@ -295,9 +303,10 @@ public function testGetChildNoPermission() { } /** - * @expectedException \Sabre\DAV\Exception\ServiceUnavailable */ public function testGetChildThrowStorageNotAvailableException() { + $this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class); + $this->view->expects($this->once()) ->method('getFileInfo') ->willThrowException(new StorageNotAvailableException()); @@ -307,9 +316,10 @@ public function testGetChildThrowStorageNotAvailableException() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\InvalidPath */ public function testGetChildThrowInvalidPath() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\InvalidPath::class); + $this->view->expects($this->once()) ->method('verifyPath') ->willThrowException(new \OCP\Files\InvalidPathException()); @@ -385,9 +395,10 @@ public function testGetQuotaInfoSpecific() { /** * @dataProvider moveFailedProvider - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testMoveFailed($source, $destination, $updatables, $deletables) { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->moveTest($source, $destination, $updatables, $deletables); } @@ -401,9 +412,10 @@ public function testMoveSuccess($source, $destination, $updatables, $deletables) /** * @dataProvider moveFailedInvalidCharsProvider - * @expectedException \OCA\DAV\Connector\Sabre\Exception\InvalidPath */ public function testMoveFailedInvalidChars($source, $destination, $updatables, $deletables) { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\InvalidPath::class); + $this->moveTest($source, $destination, $updatables, $deletables); } @@ -455,10 +467,11 @@ private function moveTest($source, $destination, $updatables, $deletables) { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage Could not copy directory b, target exists */ public function testFailingMove() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('Could not copy directory b, target exists'); + $source = 'a/b'; $destination = 'c/b'; $updatables = ['a' => true, 'a/b' => true, 'b' => true, 'c/b' => false]; @@ -484,10 +497,11 @@ public function testFailingMove() { /** * A test to throw ExcludeForbiddenException * - * @expectedException \OCP\Files\FileContentNotAllowedException - * @expectedExceptionMessage The message already logged */ public function testFailCreateFile() { + $this->expectException(\OCP\Files\FileContentNotAllowedException::class); + $this->expectExceptionMessage('The message already logged'); + //$this->invokePrivate(); $previous = new FileContentNotAllowedException('The message already logged', false); $this->view->expects($this->any()) @@ -498,9 +512,10 @@ public function testFailCreateFile() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testCreateFileForbidden() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->view->expects($this->any()) ->method('isCreatable') ->willThrowException(new \Sabre\DAV\Exception\Forbidden()); @@ -509,9 +524,10 @@ public function testCreateFileForbidden() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testSetNameRenameOperationFailed() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $storage = $this->createMock(IStorage::class); $storage->method('getId')->will($this->returnValue('home::someuser')); diff --git a/apps/dav/tests/unit/Connector/Sabre/FileTest.php b/apps/dav/tests/unit/Connector/Sabre/FileTest.php index 47a6c7012ccf..a98f6d2e0c75 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FileTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FileTest.php @@ -236,11 +236,12 @@ function ($path) use ($storage) { * Test that FileContentNotAllowedException properly mapped to * ForbiddenException * - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden * * @return void */ public function testFileContentNotAllowedConvertedToForbidden() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $storage = $this->getMockBuilder(Local::class) ->setMethods(['fopen']) ->setConstructorArgs( @@ -478,9 +479,10 @@ public function testPutSingleFile() { } /** - * @expectedException \Sabre\DAV\Exception\BadRequest */ public function testPutSingleFileWrongChecksum() { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $request = new \OC\AppFramework\Http\Request([ 'server' => [ 'HTTP_OC_CHECKSUM' => '00000000000000', @@ -491,9 +493,10 @@ public function testPutSingleFileWrongChecksum() { } /** - * @expectedException \Sabre\DAV\Exception\BadRequest */ public function testChunkedPutFileWrongChecksum() { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $request = new \OC\AppFramework\Http\Request([ 'server' => [ 'HTTP_OC_CHECKSUM' => '000000000000', @@ -1018,9 +1021,10 @@ public function testSimplePutInvalidChars() { /** * Test setting name with setName() with invalid chars * - * @expectedException \OCA\DAV\Connector\Sabre\Exception\InvalidPath */ public function testSetNameInvalidChars() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\InvalidPath::class); + // setup $view = $this->getMockBuilder(View::class) ->setMethods(['getRelativePath']) @@ -1038,9 +1042,10 @@ public function testSetNameInvalidChars() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testSetNameRenameOperationFailed() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $view = $this->createMock(View::class); $view->method('verifyPath')->willReturn(true); $view->method('getRelativePath')->will($this->returnArgument(0)); @@ -1120,9 +1125,10 @@ public function testDeleteWhenAllowed() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testDeleteThrowsWhenDeletionNotAllowed() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + // setup $view = $this->createMock(View::class); @@ -1137,9 +1143,10 @@ public function testDeleteThrowsWhenDeletionNotAllowed() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testDeleteThrowsWhenDeletionFailed() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + // setup $view = $this->createMock(View::class); @@ -1159,9 +1166,10 @@ public function testDeleteThrowsWhenDeletionFailed() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testDeleteThrowsWhenDeletionThrows() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + // setup $view = $this->createMock(View::class); @@ -1396,9 +1404,10 @@ private function getFileInfos($path = '', View $userView = null) { } /** - * @expectedException \Sabre\DAV\Exception\ServiceUnavailable */ public function testGetFopenFails() { + $this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class); + $view = $this->getMockBuilder(View::class) ->setMethods(['fopen', 'file_exists']) ->getMock(); @@ -1419,9 +1428,10 @@ public function testGetFopenFails() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testGetFopenThrows() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $view = $this->getMockBuilder(View::class) ->setMethods(['fopen', 'file_exists']) ->getMock(); @@ -1442,10 +1452,11 @@ public function testGetFopenThrows() { } /** - * @expectedException \Sabre\Dav\Exception\Forbidden - * @expectedExceptionMessage Encryption not ready */ public function testFopenForbiddenExceptionEncryption() { + $this->expectException(\Sabre\Dav\Exception\Forbidden::class); + $this->expectExceptionMessage('Encryption not ready'); + $view = $this->getMockBuilder(View::class) ->setMethods(['fopen', 'file_exists']) ->getMock(); @@ -1466,9 +1477,10 @@ public function testFopenForbiddenExceptionEncryption() { } /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testGetThrowsIfNoPermission() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $view = $this->getMockBuilder(View::class) ->setMethods(['fopen']) ->getMock(); @@ -1485,9 +1497,10 @@ public function testGetThrowsIfNoPermission() { } /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testGetThrowsIfFileNotExists() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $view = $this->getMockBuilder(View::class) ->setMethods(['fopen', 'file_exists']) ->getMock(); @@ -1507,9 +1520,10 @@ public function testGetThrowsIfFileNotExists() { } /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testGetThrowsIfNoPermissionsAndFileNotExists() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $view = $this->getMockBuilder(View::class) ->setMethods(['fopen', 'file_exists']) ->getMock(); diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php index 5a2b85787390..c9fc122c7185 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php @@ -342,9 +342,10 @@ public function testGetPropertiesForRootDirectory() { } /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testGetPropertiesWhenNoPermission() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + /** @var Directory | \PHPUnit\Framework\MockObject\MockObject $node */ $node = $this->getMockBuilder(Directory::class) ->disableOriginalConstructor() @@ -446,10 +447,11 @@ public function testUpdatePropsForbidden() { * FolderA is an incoming shared folder and there are no delete permissions. * Thus moving /FolderA/test.txt to /test.txt should fail already on that check * - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage FolderA/test.txt cannot be deleted */ public function testMoveSrcNotDeletable() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('FolderA/test.txt cannot be deleted'); + $fileInfoFolderATestTXT = $this->getMockBuilder(FileInfo::class) ->disableOriginalConstructor() ->getMock(); @@ -488,10 +490,11 @@ public function testMoveSrcDeletable() { } /** - * @expectedException \Sabre\DAV\Exception\NotFound - * @expectedExceptionMessage FolderA/test.txt does not exist */ public function testMoveSrcNotExist() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $this->expectExceptionMessage('FolderA/test.txt does not exist'); + $node = $this->createMock(Node::class); $node->expects($this->once()) ->method('getFileInfo') diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php index f2e9452537a5..f727fd28d1e8 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesReportPluginTest.php @@ -594,9 +594,10 @@ public function testProcessFilterRulesInvisibleTagAsAdmin() { } /** - * @expectedException \OCP\SystemTag\TagNotFoundException */ public function testProcessFilterRulesInvisibleTagAsUser() { + $this->expectException(\OCP\SystemTag\TagNotFoundException::class); + $this->groupManager->expects($this->any()) ->method('isAdmin') ->will($this->returnValue(false)); diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesSearchReportPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesSearchReportPluginTest.php index 67efe34bf3b0..a51796c112a1 100644 --- a/apps/dav/tests/unit/Connector/Sabre/FilesSearchReportPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/FilesSearchReportPluginTest.php @@ -107,9 +107,10 @@ public function testOnReportWrongReportName() { } /** - * @expectedException \Sabre\DAV\Exception\NotImplemented */ public function testOnReportNotRoot() { + $this->expectException(\Sabre\DAV\Exception\NotImplemented::class); + $base = '/remote.php/dav/files/user'; $nodePath = '/totally/unrelated/13'; $path = "{$base}{$nodePath}"; @@ -136,9 +137,10 @@ public function onReportNoSearchPatternProvider() { /** * @dataProvider onReportNoSearchPatternProvider - * @expectedException \Sabre\DAV\Exception\BadRequest */ public function testOnReportNoSearchPattern($properties, $searchInfo) { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $base = '/remote.php/dav/files/user'; $nodePath = '/'; $path = "{$base}{$nodePath}"; diff --git a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php index d487161cd132..48fc418794ed 100644 --- a/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/MaintenancePluginTest.php @@ -45,10 +45,11 @@ public function setUp(): void { } /** - * @expectedException \Sabre\DAV\Exception\ServiceUnavailable - * @expectedExceptionMessage System in single user mode. */ public function testSingleUserMode() { + $this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class); + $this->expectExceptionMessage('System in single user mode.'); + $this->config ->expects($this->once()) ->method('getSystemValue') @@ -59,10 +60,11 @@ public function testSingleUserMode() { } /** - * @expectedException \Sabre\DAV\Exception\ServiceUnavailable - * @expectedExceptionMessage System in single user mode. */ public function testMaintenanceMode() { + $this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class); + $this->expectExceptionMessage('System in single user mode.'); + $this->config ->expects($this->exactly(1)) ->method('getSystemValue') diff --git a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php index 671893acee3e..392dc8077176 100644 --- a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php @@ -91,9 +91,10 @@ public function testCopy($sourcePath, $targetPath, $targetParent) { /** * @dataProvider copyDataProvider - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testCopyFailNotCreatable($sourcePath, $targetPath, $targetParent) { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $view = $this->createMock(View::class); $view->expects($this->once()) ->method('verifyPath') @@ -244,9 +245,10 @@ public function nodeForPathProvider() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\InvalidPath */ public function testGetNodeForPathInvalidPath() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\InvalidPath::class); + $path = '/foo\bar'; $storage = new Temporary([]); diff --git a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php index be586c122d69..062f316324ec 100644 --- a/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/PrincipalTest.php @@ -187,10 +187,11 @@ public function testGetGroupMemberSet() { } /** - * @expectedException \Sabre\DAV\Exception - * @expectedExceptionMessage Principal not found */ public function testGetGroupMemberSetEmpty() { + $this->expectException(\Sabre\DAV\Exception::class); + $this->expectExceptionMessage('Principal not found'); + $this->userManager ->expects($this->once()) ->method('get') @@ -228,10 +229,11 @@ public function testGetGroupMembership() { } /** - * @expectedException \Sabre\DAV\Exception - * @expectedExceptionMessage Principal not found */ public function testGetGroupMembershipEmpty() { + $this->expectException(\Sabre\DAV\Exception::class); + $this->expectExceptionMessage('Principal not found'); + $this->userManager ->expects($this->once()) ->method('get') @@ -242,10 +244,11 @@ public function testGetGroupMembershipEmpty() { } /** - * @expectedException \Sabre\DAV\Exception - * @expectedExceptionMessage Setting members of the group is not supported yet */ public function testSetGroupMembership() { + $this->expectException(\Sabre\DAV\Exception::class); + $this->expectExceptionMessage('Setting members of the group is not supported yet'); + $this->connector->setGroupMemberSet('principals/users/foo', ['foo']); } diff --git a/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php index 380422063ad6..199175b96d19 100644 --- a/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/QuotaPluginTest.php @@ -81,10 +81,11 @@ public function testCheckQuota($quota, $headers) { } /** - * @expectedException \Sabre\DAV\Exception\InsufficientStorage * @dataProvider quotaExceededProvider */ public function testCheckExceededQuota($quota, $headers) { + $this->expectException(\Sabre\DAV\Exception\InsufficientStorage::class); + $this->init($quota); $this->plugin->expects($this->never()) ->method('getFileChunking'); @@ -212,9 +213,10 @@ public function quotaChunkedFailProvider() { /** * @dataProvider quotaChunkedFailProvider - * @expectedException \Sabre\DAV\Exception\InsufficientStorage */ public function testCheckQuotaChunkedFail($quota, $chunkTotalSize, $headers) { + $this->expectException(\Sabre\DAV\Exception\InsufficientStorage::class); + $this->init($quota, 'sub/test.txt'); $mockChunking = $this->getMockBuilder(\OC_FileChunking::class) diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/DownloadTest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/DownloadTest.php index b82d991a0b9b..c618712e36fe 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/DownloadTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/DownloadTest.php @@ -46,9 +46,10 @@ public function testDownload() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\FileLocked */ public function testDownloadWriteLocked() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\FileLocked::class); + $user = $this->getUniqueID(); $view = $this->setupUser($user, 'pass'); diff --git a/apps/dav/tests/unit/Connector/Sabre/RequestTest/UploadTest.php b/apps/dav/tests/unit/Connector/Sabre/RequestTest/UploadTest.php index 1d9f34b3400e..7dbba1b6c569 100644 --- a/apps/dav/tests/unit/Connector/Sabre/RequestTest/UploadTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/RequestTest/UploadTest.php @@ -67,9 +67,10 @@ public function testUploadOverWrite() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\FileLocked */ public function testUploadOverWriteReadLocked() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\FileLocked::class); + $user = $this->getUniqueID(); $view = $this->setupUser($user, 'pass'); @@ -81,9 +82,10 @@ public function testUploadOverWriteReadLocked() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\FileLocked */ public function testUploadOverWriteWriteLocked() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\FileLocked::class); + $user = $this->getUniqueID(); $view = $this->setupUser($user, 'pass'); $this->loginAsUser($user); @@ -161,9 +163,10 @@ public function testChunkedUploadOutOfOrder() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\FileLocked */ public function testChunkedUploadOutOfOrderReadLocked() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\FileLocked::class); + $user = $this->getUniqueID(); $view = $this->setupUser($user, 'pass'); @@ -186,9 +189,10 @@ public function testChunkedUploadOutOfOrderReadLocked() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\FileLocked */ public function testChunkedUploadOutOfOrderWriteLocked() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\FileLocked::class); + $user = $this->getUniqueID(); $view = $this->setupUser($user, 'pass'); diff --git a/apps/dav/tests/unit/Connector/Sabre/ValidateRequestPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/ValidateRequestPluginTest.php index bc34bd2c94d7..d3703e8a1328 100644 --- a/apps/dav/tests/unit/Connector/Sabre/ValidateRequestPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/ValidateRequestPluginTest.php @@ -43,10 +43,11 @@ public function setUp(): void { } /** - * @expectedException \Sabre\DAV\Exception\ServiceUnavailable - * @expectedExceptionMessage Specified header (HTTP_OC_CHUNKED/OC-Chunked header) is allowed only in webdav endpoint */ public function testOldChunkingInNewEndpoint1() { + $this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class); + $this->expectExceptionMessage('Specified header (HTTP_OC_CHUNKED/OC-Chunked header) is allowed only in webdav endpoint'); + $headers['HTTP_OC_CHUNKED'] = 1; $this->plugin = new ValidateRequestPlugin('dav'); @@ -57,10 +58,11 @@ public function testOldChunkingInNewEndpoint1() { } /** - * @expectedException \Sabre\DAV\Exception\ServiceUnavailable - * @expectedExceptionMessage Specified header (HTTP_OC_CHUNKED/OC-Chunked header) is allowed only in webdav endpoint */ public function testOldChunkingInNewEndpoint2() { + $this->expectException(\Sabre\DAV\Exception\ServiceUnavailable::class); + $this->expectExceptionMessage('Specified header (HTTP_OC_CHUNKED/OC-Chunked header) is allowed only in webdav endpoint'); + $headers['OC-Chunked'] = 1; $this->plugin = new ValidateRequestPlugin('dav'); diff --git a/apps/dav/tests/unit/DAV/CopyPluginTest.php b/apps/dav/tests/unit/DAV/CopyPluginTest.php index 96052e51c550..f5fcb2b4818d 100644 --- a/apps/dav/tests/unit/DAV/CopyPluginTest.php +++ b/apps/dav/tests/unit/DAV/CopyPluginTest.php @@ -119,10 +119,11 @@ public function testCopyPluginReturnFalse() { } /** - * @expectedException OCA\DAV\Connector\Sabre\Exception\Forbidden - * @expectedExceptionMessage Test exception */ public function testCopyPluginRethrowForbidden() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->expectExceptionMessage('Test exception'); + $destinationNode = $this->createMock(File::class); $sourceNode = $this->createMock([ICopySource::class, IFile::class]); diff --git a/apps/dav/tests/unit/DAV/GroupPrincipalTest.php b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php index fb1f1f3b2abe..86b83c771a2e 100644 --- a/apps/dav/tests/unit/DAV/GroupPrincipalTest.php +++ b/apps/dav/tests/unit/DAV/GroupPrincipalTest.php @@ -137,10 +137,11 @@ public function testGetGroupMembership() { } /** - * @expectedException \Sabre\DAV\Exception - * @expectedExceptionMessage Setting members of the group is not supported yet */ public function testSetGroupMembership() { + $this->expectException(\Sabre\DAV\Exception::class); + $this->expectExceptionMessage('Setting members of the group is not supported yet'); + $this->connector->setGroupMemberSet('principals/groups/foo', ['foo']); } diff --git a/apps/dav/tests/unit/DAV/LockPluginTest.php b/apps/dav/tests/unit/DAV/LockPluginTest.php index c62d0e4db6ac..ea1dea9e2808 100644 --- a/apps/dav/tests/unit/DAV/LockPluginTest.php +++ b/apps/dav/tests/unit/DAV/LockPluginTest.php @@ -74,9 +74,10 @@ protected function tearDown(): void { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testBeforeUnlock() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $lock = new LockInfo(); $lock->token = '123-456-789'; diff --git a/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php index d6960805ec56..c472df108598 100644 --- a/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php +++ b/apps/dav/tests/unit/DAV/SystemPrincipalBackendTest.php @@ -79,13 +79,14 @@ public function providesPath() { /** * @dataProvider providesPrincipalForGetGroupMemberSet - * @expectedException \Sabre\DAV\Exception - * @expectedExceptionMessage Principal not found * * @param string $principal * @throws \Sabre\DAV\Exception */ public function testGetGroupMemberSetExceptional($principal) { + $this->expectException(\Sabre\DAV\Exception::class); + $this->expectExceptionMessage('Principal not found'); + $backend = new SystemPrincipalBackend(); $backend->getGroupMemberSet($principal); } @@ -108,13 +109,14 @@ public function testGetGroupMemberSet() { /** * @dataProvider providesPrincipalForGetGroupMembership - * @expectedException \Sabre\DAV\Exception - * @expectedExceptionMessage Principal not found * * @param string $principal * @throws \Sabre\DAV\Exception */ public function testGetGroupMembershipExceptional($principal) { + $this->expectException(\Sabre\DAV\Exception::class); + $this->expectExceptionMessage('Principal not found'); + $backend = new SystemPrincipalBackend(); $backend->getGroupMembership($principal); } diff --git a/apps/dav/tests/unit/Files/FileLocksBackendTest.php b/apps/dav/tests/unit/Files/FileLocksBackendTest.php index 034871bc4d4d..1f1e028e4cfa 100644 --- a/apps/dav/tests/unit/Files/FileLocksBackendTest.php +++ b/apps/dav/tests/unit/Files/FileLocksBackendTest.php @@ -315,9 +315,10 @@ public function testLock() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testLockPublic() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $lockInfo = new LockInfo(); $lockInfo->token = '123-456-7890'; $lockInfo->scope = LockInfo::SHARED; @@ -337,9 +338,10 @@ public function testLockPublic() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testUnlockPublic() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $lockInfo = new LockInfo(); $lockInfo->token = '123-456-7890'; $lockInfo->scope = LockInfo::SHARED; diff --git a/apps/dav/tests/unit/Files/FilesHomeTest.php b/apps/dav/tests/unit/Files/FilesHomeTest.php index ae01a2d46995..90d970f75466 100644 --- a/apps/dav/tests/unit/Files/FilesHomeTest.php +++ b/apps/dav/tests/unit/Files/FilesHomeTest.php @@ -55,20 +55,22 @@ public function testGetName() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage Permission denied to rename this folder * @throws \Sabre\DAV\Exception\Forbidden */ public function testSetName() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('Permission denied to rename this folder'); + $this->filesHome->setName('alice'); } /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage Permission denied to delete home folder * @throws \Sabre\DAV\Exception\Forbidden */ public function testDelete() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('Permission denied to delete home folder'); + $this->filesHome->delete(); } diff --git a/apps/dav/tests/unit/Files/PublicFiles/PublicSharedRootNodeTest.php b/apps/dav/tests/unit/Files/PublicFiles/PublicSharedRootNodeTest.php index 27fe74fe82ed..ea40e0427edd 100644 --- a/apps/dav/tests/unit/Files/PublicFiles/PublicSharedRootNodeTest.php +++ b/apps/dav/tests/unit/Files/PublicFiles/PublicSharedRootNodeTest.php @@ -30,9 +30,10 @@ class PublicSharedRootNodeTest extends TestCase { /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testNoLongerExistingResource() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $share = $this->createMock(IShare::class); $request = $this->createMock(IRequest::class); $share->method('getNode')->willThrowException(new NotFoundException()); diff --git a/apps/dav/tests/unit/JobStatus/Entity/JobStatusMapperTest.php b/apps/dav/tests/unit/JobStatus/Entity/JobStatusMapperTest.php index f101acedd4e6..35a8f22fd4ba 100644 --- a/apps/dav/tests/unit/JobStatus/Entity/JobStatusMapperTest.php +++ b/apps/dav/tests/unit/JobStatus/Entity/JobStatusMapperTest.php @@ -62,9 +62,10 @@ public function tearDown(): void { } /** - * @expectedException \Doctrine\DBAL\Exception\UniqueConstraintViolationException */ public function testInsert() { + $this->expectException(\Doctrine\DBAL\Exception\UniqueConstraintViolationException::class); + $this->mapper->insert($this->testJobStatus); $this->assertNotNull($this->testJobStatus->getId()); // below throws exception due to unique constraint violation diff --git a/apps/dav/tests/unit/JobStatus/HomeTest.php b/apps/dav/tests/unit/JobStatus/HomeTest.php index 4e098b11c3ac..c0fe1f51cc40 100644 --- a/apps/dav/tests/unit/JobStatus/HomeTest.php +++ b/apps/dav/tests/unit/JobStatus/HomeTest.php @@ -42,9 +42,10 @@ public function testGetName() { } /** - * @expectedException \Sabre\DAV\Exception\MethodNotAllowed */ public function testGetChildren() { + $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); + /** @var JobStatusMapper | \PHPUnit\Framework\MockObject\MockObject $mapper */ $mapper = $this->createMock(JobStatusMapper::class); $home = new Home(['uri' => 'principals/users/user1'], $mapper); @@ -64,9 +65,10 @@ public function testGetChild() { } /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testGetChildNotFound() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + /** @var JobStatusMapper | \PHPUnit\Framework\MockObject\MockObject $mapper */ $mapper = $this->createMock(JobStatusMapper::class); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php b/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php index f719edf4fd92..9bdc5c6bd35c 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagMappingNodeTest.php @@ -139,9 +139,10 @@ public function testDeleteTagExpectedException(ISystemTag $tag, $expectedExcepti } /** - * @expectedException Sabre\DAV\Exception\NotFound */ public function testDeleteTagNotFound() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + // assuming the tag existed at the time the node was created, // but got deleted concurrently in the database $tag = new SystemTag(1, 'Test', true, true); @@ -164,9 +165,10 @@ public function testDeleteTagNotFound() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testeDeteteTagNotAllowedStaticTag() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $tag = new SystemTag(1, 'Test', true, true, false); $this->tagManager->method('canUserSeeTag') ->willReturn(true); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php index 4e41c16c3619..c410ee4c3d2c 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagNodeTest.php @@ -74,9 +74,10 @@ public function testGetters($isAdmin) { } /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed */ public function testSetName() { + $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); + $this->getTagNode()->setName('2'); } @@ -193,9 +194,10 @@ public function testUpdateTagPermissionException($originalTag, $changedArgs, $ex } /** - * @expectedException Sabre\DAV\Exception\Conflict */ public function testUpdateTagAlreadyExists() { + $this->expectException(\Sabre\DAV\Exception\Conflict::class); + $tag = new SystemTag(1, 'tag1', true, true); $this->tagManager->expects($this->any()) ->method('canUserSeeTag') @@ -215,9 +217,10 @@ public function testUpdateTagAlreadyExists() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testStaticTagUpdateFail() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $tag = new SystemTag(1, 'tag1', true, true, false); $this->tagManager->expects($this->any()) ->method('canUserSeeTag') @@ -231,9 +234,10 @@ public function testStaticTagUpdateFail() { } /** - * @expectedException Sabre\DAV\Exception\NotFound */ public function testUpdateTagNotFound() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $tag = new SystemTag(1, 'tag1', true, true); $this->tagManager->expects($this->any()) ->method('canUserSeeTag') @@ -313,9 +317,10 @@ public function testDeleteTagPermissionException(ISystemTag $tag, $expectedExcep } /** - * @expectedException Sabre\DAV\Exception\NotFound */ public function testDeleteTagNotFound() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $tag = new SystemTag(1, 'tag1', true, true); $this->tagManager->expects($this->any()) ->method('canUserSeeTag') @@ -335,9 +340,10 @@ public function testDeleteTagNotFound() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testStaticTagExceptionForDelete() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $tag = new SystemTag(1, 'tag1', true, true, false); $this->tagManager->expects($this->any()) ->method('canUserSeeTag') diff --git a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php index 5fb19cacdb14..dc122766857a 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagPluginTest.php @@ -227,9 +227,10 @@ public function testGetProperties(ISystemTag $systemTag, $groups, $requestedProp } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testGetPropertiesForbidden() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $systemTag = new SystemTag(1, 'Test', true, false); $requestedProperties = [ self::ID_PROPERTYNAME, @@ -326,9 +327,10 @@ public function testUpdatePropertiesAdmin() { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden */ public function testUpdatePropertiesForbidden() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $systemTag = new SystemTag(1, 'Test', true, false); $this->user->expects($this->any()) ->method('getUID') @@ -379,10 +381,11 @@ public function createTagInsufficientPermissionsProvider() { } /** * @dataProvider createTagInsufficientPermissionsProvider - * @expectedException \Sabre\DAV\Exception\BadRequest - * @expectedExceptionMessage Not sufficient permissions */ public function testCreateNotAssignableTagAsRegularUser($userVisible, $userAssignable, $userEditable, $groups) { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $this->expectExceptionMessage('Not sufficient permissions'); + $this->user->expects($this->once()) ->method('getUID') ->willReturn('admin'); @@ -655,9 +658,10 @@ public function testCreateTagInMappingCollection() { } /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testCreateTagToUnknownNode() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $node = $this->getMockBuilder('\OCA\DAV\SystemTag\SystemTagsObjectMappingCollection') ->disableOriginalConstructor() ->getMock(); @@ -688,9 +692,10 @@ public function testCreateTagToUnknownNode() { /** * @dataProvider nodeClassProvider - * @expectedException \Sabre\DAV\Exception\Conflict */ public function testCreateTagConflict($nodeClass) { + $this->expectException(\Sabre\DAV\Exception\Conflict::class); + $this->user->expects($this->once()) ->method('getUID') ->willReturn('admin'); diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php index 9924d836a0a3..aa0384d3a8f0 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsByIdCollectionTest.php @@ -71,16 +71,18 @@ public function adminFlagProvider() { } /** - * @expectedException Sabre\DAV\Exception\Forbidden */ public function testForbiddenCreateFile() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->getNode()->createFile('555'); } /** - * @expectedException Sabre\DAV\Exception\Forbidden */ public function testForbiddenCreateDirectory() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->getNode()->createDirectory('789'); } @@ -104,9 +106,10 @@ public function testGetChild() { } /** - * @expectedException Sabre\DAV\Exception\BadRequest */ public function testGetChildInvalidName() { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $this->tagManager->expects($this->once()) ->method('getTagsByIds') ->with(['invalid']) @@ -116,9 +119,10 @@ public function testGetChildInvalidName() { } /** - * @expectedException Sabre\DAV\Exception\NotFound */ public function testGetChildNotFound() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $this->tagManager->expects($this->once()) ->method('getTagsByIds') ->with(['444']) @@ -128,9 +132,10 @@ public function testGetChildNotFound() { } /** - * @expectedException Sabre\DAV\Exception\NotFound */ public function testGetChildUserNotVisible() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $tag = new SystemTag(123, 'Test', false, false); $this->tagManager->expects($this->once()) @@ -281,9 +286,10 @@ public function testChildExistsNotFound() { } /** - * @expectedException Sabre\DAV\Exception\BadRequest */ public function testChildExistsBadRequest() { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $this->tagManager->expects($this->once()) ->method('getTagsByIds') ->with(['invalid']) diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php index 0283dc5d7233..9dbb94c58d7e 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php @@ -127,10 +127,11 @@ public function testAssignTagNoPermission($userVisible, $userAssignable, $expect } /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage No permission to assign tag 555 */ public function testStaticTagAssignNoPermission() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('No permission to assign tag 555'); + $tag = new SystemTag('1', 'Test', true, true, false); $this->tagManager->expects($this->once()) ->method('getTagsByIds') @@ -147,9 +148,10 @@ public function testStaticTagAssignNoPermission() { } /** - * @expectedException Sabre\DAV\Exception\PreconditionFailed */ public function testAssignTagNotFound() { + $this->expectException(\Sabre\DAV\Exception\PreconditionFailed::class); + $this->tagManager->expects($this->once()) ->method('getTagsByIds') ->with(['555']) @@ -159,9 +161,10 @@ public function testAssignTagNotFound() { } /** - * @expectedException Sabre\DAV\Exception\Forbidden */ public function testForbiddenCreateDirectory() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->getNode()->createDirectory('789'); } @@ -189,9 +192,10 @@ public function testGetChild() { } /** - * @expectedException \Sabre\DAV\Exception\NotFound */ public function testGetChildNonVisible() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $tag = new SystemTag(555, 'TheTag', false, false); $this->tagManager->expects($this->once()) ->method('canUserSeeTag') @@ -212,9 +216,10 @@ public function testGetChildNonVisible() { } /** - * @expectedException Sabre\DAV\Exception\NotFound */ public function testGetChildRelationNotFound() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $this->tagMapper->expects($this->once()) ->method('haveTag') ->with([111], 'files', '777') @@ -224,9 +229,10 @@ public function testGetChildRelationNotFound() { } /** - * @expectedException Sabre\DAV\Exception\BadRequest */ public function testGetChildInvalidId() { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $this->tagMapper->expects($this->once()) ->method('haveTag') ->with([111], 'files', 'badid') @@ -236,9 +242,10 @@ public function testGetChildInvalidId() { } /** - * @expectedException Sabre\DAV\Exception\NotFound */ public function testGetChildTagDoesNotExist() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $this->tagMapper->expects($this->once()) ->method('haveTag') ->with([111], 'files', '777') @@ -340,9 +347,10 @@ public function testChildExistsTagNotFound() { } /** - * @expectedException Sabre\DAV\Exception\BadRequest */ public function testChildExistsInvalidId() { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $this->tagMapper->expects($this->once()) ->method('haveTag') ->with([111], 'files', '555') @@ -352,16 +360,18 @@ public function testChildExistsInvalidId() { } /** - * @expectedException Sabre\DAV\Exception\Forbidden */ public function testDelete() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->getNode()->delete(); } /** - * @expectedException Sabre\DAV\Exception\Forbidden */ public function testSetName() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->getNode()->setName('somethingelse'); } diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php index e3eab3de090a..cb5eed9b2256 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectTypeCollectionTest.php @@ -84,16 +84,18 @@ protected function setUp(): void { } /** - * @expectedException Sabre\DAV\Exception\Forbidden */ public function testForbiddenCreateFile() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->node->createFile('555'); } /** - * @expectedException Sabre\DAV\Exception\Forbidden */ public function testForbiddenCreateDirectory() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->node->createDirectory('789'); } @@ -109,9 +111,10 @@ public function testGetChild() { } /** - * @expectedException Sabre\DAV\Exception\NotFound */ public function testGetChildWithoutAccess() { + $this->expectException(\Sabre\DAV\Exception\NotFound::class); + $this->userFolder->expects($this->once()) ->method('getById') ->with('555') @@ -120,9 +123,10 @@ public function testGetChildWithoutAccess() { } /** - * @expectedException Sabre\DAV\Exception\MethodNotAllowed */ public function testGetChildren() { + $this->expectException(\Sabre\DAV\Exception\MethodNotAllowed::class); + $this->node->getChildren(); } @@ -143,16 +147,18 @@ public function testChildExistsWithoutAccess() { } /** - * @expectedException Sabre\DAV\Exception\Forbidden */ public function testDelete() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->node->delete(); } /** - * @expectedException Sabre\DAV\Exception\Forbidden */ public function testSetName() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->node->setName('somethingelse'); } diff --git a/apps/dav/tests/unit/TrashBin/TrashBinFileTest.php b/apps/dav/tests/unit/TrashBin/TrashBinFileTest.php index f1d447c6bf89..05bd7bd63856 100644 --- a/apps/dav/tests/unit/TrashBin/TrashBinFileTest.php +++ b/apps/dav/tests/unit/TrashBin/TrashBinFileTest.php @@ -59,26 +59,29 @@ protected function setUp(): void { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage Permission denied to write this file */ public function testPut() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('Permission denied to write this file'); + $this->trashBinFile->put(''); } /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage Permission denied to read this file */ public function testGet() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('Permission denied to read this file'); + $this->trashBinFile->get(); } /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage Permission denied to rename this resource */ public function testSetName() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('Permission denied to rename this resource'); + $this->trashBinFile->setName(''); } diff --git a/apps/dav/tests/unit/TrashBin/TrashBinFolderTest.php b/apps/dav/tests/unit/TrashBin/TrashBinFolderTest.php index 85e17bb0f309..b8cb50d74ceb 100644 --- a/apps/dav/tests/unit/TrashBin/TrashBinFolderTest.php +++ b/apps/dav/tests/unit/TrashBin/TrashBinFolderTest.php @@ -59,26 +59,29 @@ protected function setUp(): void { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage Permission denied to create a file */ public function testCreateFile() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('Permission denied to create a file'); + $this->trashBinFolder->createFile(''); } /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage Permission denied to create a folder */ public function testCreateFolder() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('Permission denied to create a folder'); + $this->trashBinFolder->createDirectory(''); } /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage Permission denied to rename this resource */ public function testSetName() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('Permission denied to rename this resource'); + $this->trashBinFolder->setName(''); } diff --git a/apps/dav/tests/unit/TrashBin/TrashBinHomeTest.php b/apps/dav/tests/unit/TrashBin/TrashBinHomeTest.php index 07d3acb7db54..212fff7a7f49 100644 --- a/apps/dav/tests/unit/TrashBin/TrashBinHomeTest.php +++ b/apps/dav/tests/unit/TrashBin/TrashBinHomeTest.php @@ -45,10 +45,11 @@ protected function setUp(): void { } /** - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage Permission denied to rename this folder */ public function testSetName() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('Permission denied to rename this folder'); + $this->trashBinHome->setName(''); } diff --git a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php index 90f9c9db7266..3ca256931b77 100644 --- a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php +++ b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php @@ -140,10 +140,11 @@ public function testBeforeMoveFutureFileMoveIt() { } /** - * @expectedException \Sabre\DAV\Exception\BadRequest - * @expectedExceptionMessage Chunks on server do not sum up to 4 but to 3 */ public function testBeforeMoveSizeIsWrong() { + $this->expectException(\Sabre\DAV\Exception\BadRequest::class); + $this->expectExceptionMessage('Chunks on server do not sum up to 4 but to 3'); + $sourceNode = $this->createMock(FutureFile::class); $sourceNode->expects($this->once()) ->method('getSize') diff --git a/apps/dav/tests/unit/Upload/FutureFileTest.php b/apps/dav/tests/unit/Upload/FutureFileTest.php index ca7814411d76..90cc4049c110 100644 --- a/apps/dav/tests/unit/Upload/FutureFileTest.php +++ b/apps/dav/tests/unit/Upload/FutureFileTest.php @@ -68,17 +68,19 @@ public function testDelete() { } /** - * @expectedException Sabre\DAV\Exception\Forbidden */ public function testPut() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $f = $this->mockFutureFile(); $f->put(''); } /** - * @expectedException Sabre\DAV\Exception\Forbidden */ public function testSetName() { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $f = $this->mockFutureFile(); $f->setName(''); } diff --git a/apps/federatedfilesharing/tests/AddressHandlerTest.php b/apps/federatedfilesharing/tests/AddressHandlerTest.php index d2763a25c598..18c0114e64aa 100644 --- a/apps/federatedfilesharing/tests/AddressHandlerTest.php +++ b/apps/federatedfilesharing/tests/AddressHandlerTest.php @@ -113,9 +113,10 @@ public function dataTestSplitUserRemoteError() { * @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/federation/tests/Controller/SettingsControllerTest.php b/apps/federation/tests/Controller/SettingsControllerTest.php index bc3bb70ea7cd..8df1bdc7e811 100644 --- a/apps/federation/tests/Controller/SettingsControllerTest.php +++ b/apps/federation/tests/Controller/SettingsControllerTest.php @@ -79,12 +79,13 @@ public function testAddServer() { /** * @dataProvider checkServerFails - * @expectedException \OC\HintException * * @param bool $isTrustedServer * @param bool $isOwnCloud */ public function testAddServerFail($isTrustedServer, $isOwnCloud) { + $this->expectException(\OC\HintException::class); + $this->trustedServers ->expects($this->any()) ->method('isTrustedServer') @@ -126,12 +127,13 @@ public function testCheckServer() { /** * @dataProvider checkServerFails - * @expectedException \OC\HintException * * @param bool $isTrustedServer * @param bool $isOwnCloud */ public function testCheckServerFail($isTrustedServer, $isOwnCloud) { + $this->expectException(\OC\HintException::class); + $this->trustedServers ->expects($this->any()) ->method('isTrustedServer') diff --git a/apps/federation/tests/TrustedServersTest.php b/apps/federation/tests/TrustedServersTest.php index f4f6310d5648..e7c88bc63e62 100644 --- a/apps/federation/tests/TrustedServersTest.php +++ b/apps/federation/tests/TrustedServersTest.php @@ -302,10 +302,11 @@ public function dataTestIsOwnCloudServer() { } /** - * @expectedException \Exception - * @expectedExceptionMessage simulated exception */ public function testIsOwnCloudServerFail() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('simulated exception'); + $server = 'server1'; $this->httpClientService->expects($this->once())->method('newClient') @@ -335,10 +336,11 @@ public function dataTestCheckOwnCloudVersion() { /** * @dataProvider dataTestCheckOwnCloudVersionTooLow - * @expectedException \OC\HintException - * @expectedExceptionMessage Remote server version is too low. ownCloud 9.0 is required. */ public function testCheckOwnCloudVersionTooLow($status) { + $this->expectException(\OC\HintException::class); + $this->expectExceptionMessage('Remote server version is too low. ownCloud 9.0 is required.'); + $this->invokePrivate($this->trustedServers, 'checkOwnCloudVersion', [$status]); } diff --git a/apps/files/tests/ActivityHelperTest.php b/apps/files/tests/ActivityHelperTest.php index dcfd72b9ab8f..d8037f854a58 100644 --- a/apps/files/tests/ActivityHelperTest.php +++ b/apps/files/tests/ActivityHelperTest.php @@ -73,19 +73,21 @@ protected function setUp(): void { } /** - * @expectedException \RuntimeException - * @expectedExceptionMessage No favorites */ public function testGetFavoriteFilePathsNoFavorites() { + $this->expectException(\RuntimeException::class); + $this->expectExceptionMessage('No favorites'); + $this->tags->method('getFavorites')->willReturn([]); $this->helper->getFavoriteFilePaths($this->user); } /** - * @expectedException \RuntimeException - * @expectedExceptionMessage Too many favorites */ public function testGetFavoriteFilePathsTooManyFavorites() { + $this->expectException(\RuntimeException::class); + $this->expectExceptionMessage('Too many favorites'); + $tooManyFavorites = []; for ($i = 0; $i < ActivityHelper::FAVORITE_LIMIT + 1; $i++) { $tooManyFavorites[] = []; @@ -118,10 +120,11 @@ public function testGetFavoriteFilePaths() { } /** - * @expectedException \RuntimeException - * @expectedExceptionMessage No favorites */ public function testGetFavoriteFilePathsMissingFolder() { + $this->expectException(\RuntimeException::class); + $this->expectExceptionMessage('No favorites'); + $userFolder = \OC::$server->getUserFolder(); $aFolder = $userFolder->newFolder('x'); diff --git a/apps/files_external/tests/Storage/SFTP_KeyTest.php b/apps/files_external/tests/Storage/SFTP_KeyTest.php index 4625f9283a3c..b7a23f4e7026 100644 --- a/apps/files_external/tests/Storage/SFTP_KeyTest.php +++ b/apps/files_external/tests/Storage/SFTP_KeyTest.php @@ -60,9 +60,10 @@ protected function tearDown(): void { } /** - * @expectedException InvalidArgumentException */ public function testInvalidAddressShouldThrowException() { + $this->expectException(\InvalidArgumentException::class); + // I'd use example.com for this, but someone decided to break the spec and make it resolve $this->instance->assertHostAddressValid('notarealaddress...'); } @@ -72,23 +73,26 @@ public function testValidAddressShouldPass() { } /** - * @expectedException InvalidArgumentException */ public function testNegativePortNumberShouldThrowException() { + $this->expectException(\InvalidArgumentException::class); + $this->instance->assertPortNumberValid('-1'); } /** - * @expectedException InvalidArgumentException */ public function testNonNumericalPortNumberShouldThrowException() { + $this->expectException(\InvalidArgumentException::class); + $this->instance->assertPortNumberValid('a'); } /** - * @expectedException InvalidArgumentException */ public function testHighPortNumberShouldThrowException() { + $this->expectException(\InvalidArgumentException::class); + $this->instance->assertPortNumberValid('65536'); } diff --git a/apps/files_sharing/tests/API/ShareesTest.php b/apps/files_sharing/tests/API/ShareesTest.php index 7b6869fcd46b..81085b455f39 100644 --- a/apps/files_sharing/tests/API/ShareesTest.php +++ b/apps/files_sharing/tests/API/ShareesTest.php @@ -1912,9 +1912,10 @@ public function dataTestSplitUserRemoteError() { * @dataProvider dataTestSplitUserRemoteError * * @param string $id - * @expectedException \Exception */ public function testSplitUserRemoteError($id) { + $this->expectException(\Exception::class); + $this->sharees->splitUserRemote($id); } diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index 1cc798fa1cc5..28fa2630a5f5 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -1361,9 +1361,10 @@ public function testShareStorageMountPoint() { \OC_Hook::clear('OC_Filesystem', 'post_initMountPoints', '\OCA\Files_Sharing\Tests\ApiTest', 'initTestMountPointsHook'); } /** - * @expectedException \Exception */ public function testShareNonExisting() { + $this->expectException(\Exception::class); + self::loginHelper(self::TEST_FILES_SHARING_API_USER1); $id = PHP_INT_MAX - 1; @@ -1371,9 +1372,10 @@ public function testShareNonExisting() { } /** - * @expectedException \Exception */ public function testShareNotOwner() { + $this->expectException(\Exception::class); + self::loginHelper(self::TEST_FILES_SHARING_API_USER2); \OC\Files\Filesystem::file_put_contents('foo.txt', 'bar'); $info = \OC\Files\Filesystem::getFileInfo('foo.txt'); diff --git a/apps/files_sharing/tests/Controllers/ShareControllerTest.php b/apps/files_sharing/tests/Controllers/ShareControllerTest.php index eb5de966e60a..91135223d2b6 100644 --- a/apps/files_sharing/tests/Controllers/ShareControllerTest.php +++ b/apps/files_sharing/tests/Controllers/ShareControllerTest.php @@ -438,9 +438,10 @@ public function testShowShare() { } /** - * @expectedException \OCP\Files\NotFoundException */ public function testShowShareInvalid() { + $this->expectException(\OCP\Files\NotFoundException::class); + $owner = $this->createMock('OCP\IUser'); $owner->method('getDisplayName')->willReturn('ownerDisplay'); $owner->method('getUID')->willReturn('ownerUID'); @@ -507,9 +508,10 @@ public function testDownloadShare() { } /** - * @expectedException \OCP\Files\NotFoundException */ public function testDownloadShareNoReadPermission() { + $this->expectException(\OCP\Files\NotFoundException::class); + $share = $this->createMock('\OCP\Share\IShare'); $share->method('getPermissions')->willReturn(\OCP\Constants::PERMISSION_CREATE); diff --git a/apps/files_sharing/tests/LockingTest.php b/apps/files_sharing/tests/LockingTest.php index e5a556740e21..27357167d628 100644 --- a/apps/files_sharing/tests/LockingTest.php +++ b/apps/files_sharing/tests/LockingTest.php @@ -69,9 +69,10 @@ public function setUp(): void { } /** - * @expectedException \OCP\Lock\LockedException */ public function testLockAsRecipient() { + $this->expectException(\OCP\Lock\LockedException::class); + $this->loginAsUser($this->ownerUid); Filesystem::initMountPoints($this->recipientUid); diff --git a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php index 2a08cc92f386..2609fd91d887 100644 --- a/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php +++ b/apps/files_sharing/tests/Middleware/SharingCheckMiddlewareTest.php @@ -234,10 +234,11 @@ public function testBeforeControllerWithShareControllerWithSharingEnabled() { } /** - * @expectedException \OCP\Files\NotFoundException - * @expectedExceptionMessage Link sharing is disabled */ public function testBeforeControllerWithShareControllerWithSharingEnabledAPIDisabled() { + $this->expectException(\OCP\Files\NotFoundException::class); + $this->expectExceptionMessage('Link sharing is disabled'); + $this->appManager ->expects($this->once()) ->method('isEnabledForUser') @@ -251,10 +252,11 @@ public function testBeforeControllerWithShareControllerWithSharingEnabledAPIDisa } /** - * @expectedException \OCP\Files\NotFoundException - * @expectedExceptionMessage Sharing is disabled. */ public function testBeforeControllerWithSharingDisabled() { + $this->expectException(\OCP\Files\NotFoundException::class); + $this->expectExceptionMessage('Sharing is disabled.'); + $this->appManager ->expects($this->once()) ->method('isEnabledForUser') @@ -265,10 +267,11 @@ public function testBeforeControllerWithSharingDisabled() { } /** - * @expectedException \Exception - * @expectedExceptionMessage My Exception message */ public function testAfterExceptionWithRegularException() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('My Exception message'); + $this->sharingCheckMiddleware->afterException($this->controllerMock, 'myMethod', new \Exception('My Exception message')); } diff --git a/apps/files_sharing/tests/NotifierTest.php b/apps/files_sharing/tests/NotifierTest.php index 68a971b5ae8a..3dd1e480a086 100644 --- a/apps/files_sharing/tests/NotifierTest.php +++ b/apps/files_sharing/tests/NotifierTest.php @@ -88,9 +88,10 @@ public function setUp(): void { } /** - * @expectedException \InvalidArgumentException */ public function testPrepareInvalidApp() { + $this->expectException(\InvalidArgumentException::class); + $notification = $this->createMock(INotification::class); $notification->method('getApp')->willReturn('another'); $notification->method('getObjectType')->willReturn('local_share'); @@ -98,9 +99,10 @@ public function testPrepareInvalidApp() { } /** - * @expectedException \InvalidArgumentException */ public function testPrepareInvalidSubject() { + $this->expectException(\InvalidArgumentException::class); + $notification = $this->createMock(INotification::class); $notification->method('getApp')->willReturn('files_sharing'); $notification->method('getObjectType')->willReturn('invalid_object'); @@ -366,9 +368,10 @@ public function testPrepareWithCustomConfig($subject, $subjectParams, $displayna } /** - * @expectedException \InvalidArgumentException */ public function testPrepareShareWithGroupNotMemberAnyLonger() { + $this->expectException(\InvalidArgumentException::class); + $share = $this->createMock(IShare::class); $share->method('getShareType')->willReturn(\OCP\Share::SHARE_TYPE_GROUP); $share->method('getSharedWith')->willReturn('big group 1'); @@ -396,9 +399,10 @@ public function testPrepareShareWithGroupNotMemberAnyLonger() { } /** - * @expectedException \InvalidArgumentException */ public function testPrepareMissingShare() { + $this->expectException(\InvalidArgumentException::class); + $this->shareManager->method('getShareById') ->will($this->throwException(new ShareNotFound())); diff --git a/apps/files_versions/tests/VersioningTest.php b/apps/files_versions/tests/VersioningTest.php index 9bdbbc5cf1b3..89f016a59202 100644 --- a/apps/files_versions/tests/VersioningTest.php +++ b/apps/files_versions/tests/VersioningTest.php @@ -619,9 +619,10 @@ public function testExpireNonexistingFile() { } /** - * @expectedException \OC\User\NoUserException */ public function testExpireNonexistingUser() { + $this->expectException(\OC\User\NoUserException::class); + $this->logout(); // needed to have a FS setup (the background job does this) \OC_Util::setupFS($this->user1); diff --git a/tests/Core/Command/Apps/CheckCodeTest.php b/tests/Core/Command/Apps/CheckCodeTest.php index 730a1a41611e..90edb4322e60 100644 --- a/tests/Core/Command/Apps/CheckCodeTest.php +++ b/tests/Core/Command/Apps/CheckCodeTest.php @@ -36,9 +36,10 @@ class CheckCodeTest extends TestCase { private $commandTester; /** - * @expectedException \RuntimeException */ public function testWrongAppId() { + $this->expectException(\RuntimeException::class); + $command = new CheckCode(new InfoParser, \OC::$server->getAppManager()); $this->commandTester = new CommandTester($command); $this->commandTester->execute(['app-id' => 'hui-buh']); diff --git a/tests/Core/Command/Config/System/SetConfigTest.php b/tests/Core/Command/Config/System/SetConfigTest.php index 7a8f24ca899c..e8642bbbac0a 100644 --- a/tests/Core/Command/Config/System/SetConfigTest.php +++ b/tests/Core/Command/Config/System/SetConfigTest.php @@ -97,9 +97,10 @@ public function setUpdateOnlyProvider() { /** * @dataProvider setUpdateOnlyProvider - * @expectedException \UnexpectedValueException */ public function testSetUpdateOnly($configNames, $existingData) { + $this->expectException(\UnexpectedValueException::class); + $this->systemConfig->expects($this->never()) ->method('setValue'); $this->systemConfig->method('getValue') @@ -207,9 +208,10 @@ public function castValueInvalidProvider() { /** * @dataProvider castValueInvalidProvider - * @expectedException \InvalidArgumentException */ public function testCastValueInvalid($value, $type) { + $this->expectException(\InvalidArgumentException::class); + $this->invokePrivate($this->command, 'castValue', [$value, $type]); } } diff --git a/tests/Core/Command/Db/ConvertTypeTest.php b/tests/Core/Command/Db/ConvertTypeTest.php index 8a22e09b8933..8d968d3b95f4 100644 --- a/tests/Core/Command/Db/ConvertTypeTest.php +++ b/tests/Core/Command/Db/ConvertTypeTest.php @@ -64,9 +64,10 @@ protected function setUp(): void { } /** - * @expectedException \Doctrine\DBAL\DBALException */ public function testWrongConnectionParams() { + $this->expectException(\Doctrine\DBAL\DBALException::class); + if (!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\SqlitePlatform) { $this->markTestSkipped("Test only relevant on Sqlite"); } diff --git a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php index 98a70980a828..c4e60f4a9a94 100644 --- a/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php +++ b/tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php @@ -175,12 +175,13 @@ public function testPrepareNewRoot() { /** * @dataProvider dataTestPrepareNewRootException - * @expectedException \Exception * * @param bool $dirExists * @param bool $couldCreateFile */ public function testPrepareNewRootException($dirExists, $couldCreateFile) { + $this->expectException(\Exception::class); + $this->view->expects($this->once())->method('is_dir')->with('newRoot') ->willReturn($dirExists); $this->view->expects($this->any())->method('file_put_contents')->willReturn($couldCreateFile); @@ -203,11 +204,12 @@ public function nulldir() { /** * @dataProvider nulldir - * @expectedException \Exception - * @expectedExceptionMessage New root folder doesn't exist. Please create the folder or check the permissions and try again. * @param $dirExists */ public function testPrepareNewRootExceptionForNullDir($dirExists) { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('New root folder doesn\'t exist. Please create the folder or check the permissions and try again.'); + $this->view->expects($this->once())->method('is_dir')->with('../../newRoot') ->willReturn($dirExists); $this->invokePrivate($this->changeKeyStorageRoot, 'prepareNewRoot', ['../../newRoot']); @@ -375,9 +377,10 @@ public function testTargetExists() { } /** - * @expectedException \Exception */ public function testTargetExistsException() { + $this->expectException(\Exception::class); + $this->view->expects($this->once())->method('file_exists')->with('path') ->willReturn(true); diff --git a/tests/Core/Command/Encryption/DecryptAllTest.php b/tests/Core/Command/Encryption/DecryptAllTest.php index 97f0e89ed8bf..f87b1a9adfaa 100644 --- a/tests/Core/Command/Encryption/DecryptAllTest.php +++ b/tests/Core/Command/Encryption/DecryptAllTest.php @@ -175,9 +175,10 @@ public function dataTestExecute() { } /** - * @expectedException \Exception */ public function testExecuteFailure() { + $this->expectException(\Exception::class); + $instance = new DecryptAll( $this->encryptionManager, $this->appManager, diff --git a/tests/Core/Command/Encryption/EncryptAllTest.php b/tests/Core/Command/Encryption/EncryptAllTest.php index b984027e003e..abc6e0cc1d28 100644 --- a/tests/Core/Command/Encryption/EncryptAllTest.php +++ b/tests/Core/Command/Encryption/EncryptAllTest.php @@ -125,9 +125,10 @@ public function dataTestExecute() { } /** - * @expectedException \Exception */ public function testExecuteException() { + $this->expectException(\Exception::class); + $command = new EncryptAll($this->encryptionManager, $this->appManager, $this->config, $this->questionHelper); $this->encryptionManager->expects($this->once())->method('isEnabled')->willReturn(false); $this->encryptionManager->expects($this->never())->method('getEncryptionModule'); diff --git a/tests/Core/Command/Log/ManageTest.php b/tests/Core/Command/Log/ManageTest.php index bed6a5e47d11..d776cf954862 100644 --- a/tests/Core/Command/Log/ManageTest.php +++ b/tests/Core/Command/Log/ManageTest.php @@ -84,16 +84,18 @@ public function testChangeTimezone() { } /** - * @expectedException \InvalidArgumentException */ public function testValidateBackend() { + $this->expectException(\InvalidArgumentException::class); + self::invokePrivate($this->command, 'validateBackend', ['notabackend']); } /** - * @expectedException \Exception */ public function testValidateTimezone() { + $this->expectException(\Exception::class); + // this might need to be changed when humanity colonises Mars self::invokePrivate($this->command, 'validateTimezone', ['Mars/OlympusMons']); } @@ -119,9 +121,10 @@ public function testConvertLevelString($levelString, $expectedInt) { } /** - * @expectedException \InvalidArgumentException */ public function testConvertLevelStringInvalid() { + $this->expectException(\InvalidArgumentException::class); + self::invokePrivate($this->command, 'convertLevelString', ['abc']); } @@ -144,9 +147,10 @@ public function testConvertLevelNumber($levelNum, $expectedString) { } /** - * @expectedException \InvalidArgumentException */ public function testConvertLevelNumberInvalid() { + $this->expectException(\InvalidArgumentException::class); + self::invokePrivate($this->command, 'convertLevelNumber', [11]); } diff --git a/tests/Core/Middleware/AccountModuleMiddlewareTest.php b/tests/Core/Middleware/AccountModuleMiddlewareTest.php index 348a048ca099..217a4a1804bd 100644 --- a/tests/Core/Middleware/AccountModuleMiddlewareTest.php +++ b/tests/Core/Middleware/AccountModuleMiddlewareTest.php @@ -132,9 +132,10 @@ public function testBeforeControllerNotLoggedIn() { } /** - * @expectedException \UnexpectedValueException */ public function testBeforeControllerNoUserInSession() { + $this->expectException(\UnexpectedValueException::class); + $this->reflector->expects($this->once()) ->method('hasAnnotation') ->with('PublicPage') @@ -172,9 +173,10 @@ public function testBeforeControllerAccountUpToDate() { } /** - * @expectedException \OCP\Authentication\Exceptions\AccountCheckException */ public function testBeforeControllerAccountNeedsUpdate() { + $this->expectException(\OCP\Authentication\Exceptions\AccountCheckException::class); + $this->reflector->expects($this->once()) ->method('hasAnnotation') ->with('PublicPage') @@ -204,10 +206,11 @@ public function testAfterExceptionAccountNeedsUpdate() { } /** - * @expectedException \Exception - * @expectedExceptionMessage testAfterException */ public function testAfterException() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('testAfterException'); + $ex = new \Exception('testAfterException'); $this->middleware->afterException(null, null, $ex); } diff --git a/tests/Core/Middleware/TwoFactorMiddlewareTest.php b/tests/Core/Middleware/TwoFactorMiddlewareTest.php index 8a7b1bf2507c..cd97aae0f9f7 100644 --- a/tests/Core/Middleware/TwoFactorMiddlewareTest.php +++ b/tests/Core/Middleware/TwoFactorMiddlewareTest.php @@ -123,9 +123,10 @@ public function testBeforeControllerNoTwoFactorCheckNeeded() { } /** - * @expectedException \OC\Authentication\Exceptions\TwoFactorAuthRequiredException */ public function testBeforeControllerTwoFactorAuthRequired() { + $this->expectException(\OC\Authentication\Exceptions\TwoFactorAuthRequiredException::class); + $user = $this->createMock('\OCP\IUser'); $this->reflector->expects($this->once()) @@ -150,9 +151,10 @@ public function testBeforeControllerTwoFactorAuthRequired() { } /** - * @expectedException \OC\Authentication\Exceptions\UserAlreadyLoggedInException */ public function testBeforeControllerUserAlreadyLoggedIn() { + $this->expectException(\OC\Authentication\Exceptions\UserAlreadyLoggedInException::class); + $user = $this->createMock('\OCP\IUser'); $this->reflector->expects($this->once()) diff --git a/tests/Settings/Middleware/SubadminMiddlewareTest.php b/tests/Settings/Middleware/SubadminMiddlewareTest.php index ebb759803037..8bc5e1943845 100644 --- a/tests/Settings/Middleware/SubadminMiddlewareTest.php +++ b/tests/Settings/Middleware/SubadminMiddlewareTest.php @@ -43,9 +43,10 @@ protected function setUp(): void { } /** - * @expectedException \OC\AppFramework\Middleware\Security\Exceptions\NotSubadminException */ public function testBeforeControllerAsUserWithExemption() { + $this->expectException(\OC\AppFramework\Middleware\Security\Exceptions\NotSubadminException::class); + $this->reflector ->expects($this->once()) ->method('hasAnnotation') @@ -88,9 +89,10 @@ public function testAfterNotAdminException() { } /** - * @expectedException \Exception */ public function testAfterRegularException() { + $this->expectException(\Exception::class); + $expectedResponse = new TemplateResponse('core', '403', [], 'guest'); $expectedResponse->setStatus(403); $this->subadminMiddleware->afterException($this->controller, 'foo', new \Exception()); diff --git a/tests/lib/Activity/ManagerTest.php b/tests/lib/Activity/ManagerTest.php index 00e2c2b6163c..1308ac465c4b 100644 --- a/tests/lib/Activity/ManagerTest.php +++ b/tests/lib/Activity/ManagerTest.php @@ -71,9 +71,10 @@ public function testGetConsumers() { } /** - * @expectedException \InvalidArgumentException */ public function testGetConsumersInvalidConsumer() { + $this->expectException(\InvalidArgumentException::class); + $this->activityManager->registerConsumer(function () { return new \stdClass(); }); @@ -88,9 +89,10 @@ public function testGetExtensions() { } /** - * @expectedException \InvalidArgumentException */ public function testGetExtensionsInvalidExtension() { + $this->expectException(\InvalidArgumentException::class); + $this->activityManager->registerExtension(function () { return new \stdClass(); }); @@ -197,13 +199,14 @@ public function getUserFromTokenThrowInvalidTokenData() { } /** - * @expectedException \UnexpectedValueException * @dataProvider getUserFromTokenThrowInvalidTokenData * * @param string $token * @param array $users */ public function testGetUserFromTokenThrowInvalidToken($token, $users) { + $this->expectException(\UnexpectedValueException::class); + $this->mockRSSToken($token, $token, $users); self::invokePrivate($this->activityManager, 'getUserFromToken'); } @@ -263,32 +266,35 @@ protected function mockUserSession($user) { } /** - * @expectedException \BadMethodCallException - * @expectedExceptionMessage App not set - * @expectedExceptionCode 10 */ public function testPublishExceptionNoApp() { + $this->expectException(\BadMethodCallException::class); + $this->expectExceptionMessage('App not set'); + $this->expectExceptionCode(10); + $event = new \OC\Activity\Event(); $this->activityManager->publish($event); } /** - * @expectedException \BadMethodCallException - * @expectedExceptionMessage Type not set - * @expectedExceptionCode 11 */ public function testPublishExceptionNoType() { + $this->expectException(\BadMethodCallException::class); + $this->expectExceptionMessage('Type not set'); + $this->expectExceptionCode(11); + $event = new \OC\Activity\Event(); $event->setApp('test'); $this->activityManager->publish($event); } /** - * @expectedException \BadMethodCallException - * @expectedExceptionMessage Affected user not set - * @expectedExceptionCode 12 */ public function testPublishExceptionNoAffectedUser() { + $this->expectException(\BadMethodCallException::class); + $this->expectExceptionMessage('Affected user not set'); + $this->expectExceptionCode(12); + $event = new \OC\Activity\Event(); $event->setApp('test') ->setType('test_type'); @@ -296,11 +302,12 @@ public function testPublishExceptionNoAffectedUser() { } /** - * @expectedException \BadMethodCallException - * @expectedExceptionMessage Subject not set - * @expectedExceptionCode 13 */ public function testPublishExceptionNoSubject() { + $this->expectException(\BadMethodCallException::class); + $this->expectExceptionMessage('Subject not set'); + $this->expectExceptionCode(13); + $event = new \OC\Activity\Event(); $event->setApp('test') ->setType('test_type') diff --git a/tests/lib/Activity/NullSession/ManagerTest.php b/tests/lib/Activity/NullSession/ManagerTest.php index e8a509c4d903..f15c3a488964 100644 --- a/tests/lib/Activity/NullSession/ManagerTest.php +++ b/tests/lib/Activity/NullSession/ManagerTest.php @@ -69,9 +69,10 @@ public function testGetConsumers() { } /** - * @expectedException \InvalidArgumentException */ public function testGetConsumersInvalidConsumer() { + $this->expectException(\InvalidArgumentException::class); + $this->activityManager->registerConsumer(function () { return new \stdClass(); }); @@ -86,9 +87,10 @@ public function testGetExtensions() { } /** - * @expectedException \InvalidArgumentException */ public function testGetExtensionsInvalidExtension() { + $this->expectException(\InvalidArgumentException::class); + $this->activityManager->registerExtension(function () { return new \stdClass(); }); @@ -195,13 +197,14 @@ public function getUserFromTokenThrowInvalidTokenData() { } /** - * @expectedException \UnexpectedValueException * @dataProvider getUserFromTokenThrowInvalidTokenData * * @param string $token * @param array $users */ public function testGetUserFromTokenThrowInvalidToken($token, $users) { + $this->expectException(\UnexpectedValueException::class); + $this->mockRSSToken($token, $token, $users); self::invokePrivate($this->activityManager, 'getUserFromToken'); } @@ -239,32 +242,35 @@ protected function mockRSSToken($requestToken, $userToken, $users) { } /** - * @expectedException \BadMethodCallException - * @expectedExceptionMessage App not set - * @expectedExceptionCode 10 */ public function testPublishExceptionNoApp() { + $this->expectException(\BadMethodCallException::class); + $this->expectExceptionMessage('App not set'); + $this->expectExceptionCode(10); + $event = new Event(); $this->activityManager->publish($event); } /** - * @expectedException \BadMethodCallException - * @expectedExceptionMessage Type not set - * @expectedExceptionCode 11 */ public function testPublishExceptionNoType() { + $this->expectException(\BadMethodCallException::class); + $this->expectExceptionMessage('Type not set'); + $this->expectExceptionCode(11); + $event = new Event(); $event->setApp('test'); $this->activityManager->publish($event); } /** - * @expectedException \BadMethodCallException - * @expectedExceptionMessage Affected user not set - * @expectedExceptionCode 12 */ public function testPublishExceptionNoAffectedUser() { + $this->expectException(\BadMethodCallException::class); + $this->expectExceptionMessage('Affected user not set'); + $this->expectExceptionCode(12); + $event = new Event(); $event->setApp('test') ->setType('test_type'); @@ -272,11 +278,12 @@ public function testPublishExceptionNoAffectedUser() { } /** - * @expectedException \BadMethodCallException - * @expectedExceptionMessage Subject not set - * @expectedExceptionCode 13 */ public function testPublishExceptionNoSubject() { + $this->expectException(\BadMethodCallException::class); + $this->expectExceptionMessage('Subject not set'); + $this->expectExceptionCode(13); + $event = new Event(); $event->setApp('test') ->setType('test_type') diff --git a/tests/lib/AllConfigTest.php b/tests/lib/AllConfigTest.php index 2fc0d4ff90ed..d2701e7a3583 100644 --- a/tests/lib/AllConfigTest.php +++ b/tests/lib/AllConfigTest.php @@ -167,17 +167,19 @@ public function dataSetUserValueUnexpectedValue() { /** * @dataProvider dataSetUserValueUnexpectedValue * @param mixed $value - * @expectedException \UnexpectedValueException */ public function testSetUserValueUnexpectedValue($value) { + $this->expectException(\UnexpectedValueException::class); + $config = $this->getConfig(); $config->setUserValue('userSetBool', 'appSetBool', 'keySetBool', $value); } /** - * @expectedException \OCP\PreConditionNotMetException */ public function testSetUserValueWithPreConditionFailure() { + $this->expectException(\OCP\PreConditionNotMetException::class); + $config = $this->getConfig(); $selectAllSQL = 'SELECT `userid`, `appid`, `configkey`, `configvalue` FROM `*PREFIX*preferences` WHERE `userid` = ?'; diff --git a/tests/lib/App/InfoParserTest.php b/tests/lib/App/InfoParserTest.php index 13396f5d66a4..148859448c5e 100644 --- a/tests/lib/App/InfoParserTest.php +++ b/tests/lib/App/InfoParserTest.php @@ -32,17 +32,19 @@ public function testParsingValidXml() { } /** - * @expectedException \OCP\App\AppNotFoundException */ public function testParsingMissingXml() { + $this->expectException(\OCP\App\AppNotFoundException::class); + $this->parser->parse('none'); } /** * @dataProvider invalidXmlProvider - * @expectedException \InvalidArgumentException */ public function testParsingInvalidXml($xmlFile) { + $this->expectException(\InvalidArgumentException::class); + $this->parser->parse(OC::$SERVERROOT. '/tests/data/app/' . $xmlFile); } diff --git a/tests/lib/App/ManagerTest.php b/tests/lib/App/ManagerTest.php index f94cc19591d8..0b37c55fc33f 100644 --- a/tests/lib/App/ManagerTest.php +++ b/tests/lib/App/ManagerTest.php @@ -125,9 +125,10 @@ public function testEnableApp() { } /** - * @expectedException \OCP\App\AppManagerException */ public function testEnableSecondAppTheme() { + $this->expectException(\OCP\App\AppManagerException::class); + $appThemeName = 'theme-one'; $manager = $this->getMockBuilder(AppManager::class) ->setMethods(['isTheme', 'getAppInfo', 'getAppPath']) @@ -193,9 +194,10 @@ public function testDisableApp() { } /** - * @expectedException \Exception */ public function testNotEnableIfNotInstalled() { + $this->expectException(\Exception::class); + $this->manager->enableApp('some_random_name_which_i_hope_is_not_an_app'); $this->assertEquals('no', $this->appConfig->getValue( 'some_random_name_which_i_hope_is_not_an_app', 'enabled', 'no' @@ -271,10 +273,11 @@ public function dataEnableAppForGroupsForbiddenTypes() { * * @param string $type * - * @expectedException \Exception - * @expectedExceptionMessage test can't be enabled for groups. */ public function testEnableAppForGroupsForbiddenTypes($type) { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('test can\'t be enabled for groups.'); + $groups = [ new Group('group1', [], null, $this->eventDispatcher), new Group('group2', [], null, $this->eventDispatcher) diff --git a/tests/lib/AppFramework/Controller/ControllerTest.php b/tests/lib/AppFramework/Controller/ControllerTest.php index b9d8bc0c3d88..ee71a7683bd2 100644 --- a/tests/lib/AppFramework/Controller/ControllerTest.php +++ b/tests/lib/AppFramework/Controller/ControllerTest.php @@ -152,9 +152,10 @@ public function testGetEnvVariable() { } /** - * @expectedException \DomainException */ public function testFormatResonseInvalidFormat() { + $this->expectException(\DomainException::class); + $this->controller->buildResponse(null, 'test'); } diff --git a/tests/lib/AppFramework/Http/JSONResponseTest.php b/tests/lib/AppFramework/Http/JSONResponseTest.php index 2ff551b94226..aa426d57e0fe 100644 --- a/tests/lib/AppFramework/Http/JSONResponseTest.php +++ b/tests/lib/AppFramework/Http/JSONResponseTest.php @@ -86,11 +86,12 @@ public function testRender(array $input, $expected) { } /** - * @expectedException \Exception - * @expectedExceptionMessage Could not json_encode due to invalid non UTF-8 characters in the array: array ( * @requires PHP 5.5 */ public function testRenderWithNonUtf8Encoding() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Could not json_encode due to invalid non UTF-8 characters in the array: array ('); + $params = ['test' => \hex2bin('e9')]; $this->json->setData($params); $this->json->render(); diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php index b9a4f82adf6a..62262f355cb1 100644 --- a/tests/lib/AppFramework/Http/RequestTest.php +++ b/tests/lib/AppFramework/Http/RequestTest.php @@ -104,9 +104,10 @@ public function testPrecedence() { } /** - * @expectedException \RuntimeException */ public function testImmutableArrayAccess() { + $this->expectException(\RuntimeException::class); + $vars = [ 'get' => ['name' => 'John Q. Public', 'nickname' => 'Joey'], 'method' => 'GET' @@ -124,9 +125,10 @@ public function testImmutableArrayAccess() { } /** - * @expectedException \RuntimeException */ public function testImmutableMagicAccess() { + $this->expectException(\RuntimeException::class); + $vars = [ 'get' => ['name' => 'John Q. Public', 'nickname' => 'Joey'], 'method' => 'GET' @@ -144,9 +146,10 @@ public function testImmutableMagicAccess() { } /** - * @expectedException \LogicException */ public function testGetTheMethodRight() { + $this->expectException(\LogicException::class); + $vars = [ 'get' => ['name' => 'John Q. Public', 'nickname' => 'Joey'], 'method' => 'GET', @@ -421,9 +424,10 @@ public function providesGetIdWithInvalidXRequestID() { /** * @dataProvider providesGetIdWithInvalidXRequestID - * @expectedException \InvalidArgumentException */ public function testGetIdWithInvalidXRequestID($xRequestID) { + $this->expectException(\InvalidArgumentException::class); + $vars = [ 'server' => [ 'HTTP_X_REQUEST_ID' => $xRequestID @@ -1167,10 +1171,11 @@ public function testGetPathInfoWithPathInfoBeingEmpty() { } /** - * @expectedException \Exception - * @expectedExceptionMessage The requested uri(/foo.php) cannot be processed by the script '/var/www/index.php') */ public function testGetPathInfoNotProcessible() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('The requested uri(/foo.php) cannot be processed by the script \'/var/www/index.php\')'); + $request = new Request( [ 'server' => [ @@ -1188,10 +1193,11 @@ public function testGetPathInfoNotProcessible() { } /** - * @expectedException \Exception - * @expectedExceptionMessage The requested uri(/foo.php) cannot be processed by the script '/var/www/index.php') */ public function testGetRawPathInfoNotProcessible() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('The requested uri(/foo.php) cannot be processed by the script \'/var/www/index.php\')'); + $request = new Request( [ 'server' => [ diff --git a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php index c2bb717d451c..55eaf9add9f4 100644 --- a/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/CORSMiddlewareTest.php @@ -177,9 +177,10 @@ public function testNoOriginHeaderNoCORSHEADER() { /** * @CORS - * @expectedException \OC\AppFramework\Middleware\Security\Exceptions\SecurityException */ public function testCorsIgnoredIfWithCredentialsHeaderPresent() { + $this->expectException(\OC\AppFramework\Middleware\Security\Exceptions\SecurityException::class); + $this->config->method('getSystemValue')->willReturn([]); $request = new Request( [ @@ -246,10 +247,11 @@ public function testAfterExceptionWithSecurityExceptionWithStatus() { } /** - * @expectedException \Exception - * @expectedExceptionMessage A regular exception */ public function testAfterExceptionWithRegularException() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('A regular exception'); + $request = new Request( ['server' => [ 'PHP_AUTH_USER' => 'user', diff --git a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php index a2ff6bb372f5..0d15c8271ee3 100644 --- a/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php +++ b/tests/lib/AppFramework/Middleware/Security/SecurityMiddlewareTest.php @@ -285,11 +285,12 @@ private function securityCheck($method, $expects, $shouldFail=false) { /** * @PublicPage - * @expectedException \OC\AppFramework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException * @throws SecurityException * @throws \ReflectionException */ public function testCsrfCheck() { + $this->expectException(\OC\AppFramework\Middleware\Security\Exceptions\CrossSiteRequestForgeryException::class); + $this->request->expects($this->once()) ->method('passesCSRFCheck') ->will($this->returnValue(false)); diff --git a/tests/lib/AppFramework/Routing/RoutingTest.php b/tests/lib/AppFramework/Routing/RoutingTest.php index 22c3ddac23fa..374acb5ac857 100644 --- a/tests/lib/AppFramework/Routing/RoutingTest.php +++ b/tests/lib/AppFramework/Routing/RoutingTest.php @@ -56,9 +56,10 @@ public function testSimpleRouteWithPostfix() { } /** - * @expectedException \UnexpectedValueException */ public function testSimpleRouteWithBrokenName() { + $this->expectException(\UnexpectedValueException::class); + $routes = ['routes' => [ ['name' => 'folders_open', 'url' => '/folders/{folderId}/open', 'verb' => 'delete'] ]]; diff --git a/tests/lib/AppFramework/Utility/SimpleContainerTest.php b/tests/lib/AppFramework/Utility/SimpleContainerTest.php index a121cc2a5257..216d33c5f304 100644 --- a/tests/lib/AppFramework/Utility/SimpleContainerTest.php +++ b/tests/lib/AppFramework/Utility/SimpleContainerTest.php @@ -72,16 +72,18 @@ public function testRegister() { } /** - * @expectedException \OCP\AppFramework\QueryException */ public function testNothingRegistered() { + $this->expectException(\OCP\AppFramework\QueryException::class); + $this->container->query('something really hard'); } /** - * @expectedException \OCP\AppFramework\QueryException */ public function testNotAClass() { + $this->expectException(\OCP\AppFramework\QueryException::class); + $this->container->query('Test\AppFramework\Utility\TestInterface'); } @@ -183,9 +185,10 @@ public function testSanitizeName($register, $query) { } /** - * @expectedException \OCP\AppFramework\QueryException */ public function testConstructorComplexNoTestParameterFound() { + $this->expectException(\OCP\AppFramework\QueryException::class); + $object = $this->container->query( 'Test\AppFramework\Utility\ClassComplexConstructor' ); diff --git a/tests/lib/Authentication/Token/DefaultTokenMapperTest.php b/tests/lib/Authentication/Token/DefaultTokenMapperTest.php index d39d50a98c7a..9c936e47868d 100644 --- a/tests/lib/Authentication/Token/DefaultTokenMapperTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenMapperTest.php @@ -143,9 +143,10 @@ public function testGetToken() { } /** - * @expectedException \OCP\AppFramework\Db\DoesNotExistException */ public function testGetInvalidToken() { + $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); + $token = 'thisisaninvalidtokenthatisnotinthedatabase'; $this->mapper->getToken($token); @@ -200,9 +201,10 @@ public function testDeleteByIdWrongUser() { } /** - * @expectedException \InvalidArgumentException */ public function testEmptyName() { + $this->expectException(\InvalidArgumentException::class); + $token = new DefaultToken(); $token->setUid('user01'); $token->setName(''); @@ -210,9 +212,10 @@ public function testEmptyName() { } /** - * @expectedException \InvalidArgumentException */ public function testEmptyLoginName() { + $this->expectException(\InvalidArgumentException::class); + $token = new DefaultToken(); $token->setUid('user01'); $token->setLoginName(''); diff --git a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php index 35e2dd372e15..163ddbe8aa3c 100644 --- a/tests/lib/Authentication/Token/DefaultTokenProviderTest.php +++ b/tests/lib/Authentication/Token/DefaultTokenProviderTest.php @@ -146,9 +146,10 @@ public function testGetPassword() { } /** - * @expectedException \OC\Authentication\Exceptions\PasswordlessTokenException */ public function testGetPasswordPasswordLessToken() { + $this->expectException(\OC\Authentication\Exceptions\PasswordlessTokenException::class); + $token = 'token1234'; $tk = new DefaultToken(); $tk->setPassword(null); @@ -157,9 +158,10 @@ public function testGetPasswordPasswordLessToken() { } /** - * @expectedException \OC\Authentication\Exceptions\InvalidTokenException */ public function testGetPasswordDeletesInvalidToken() { + $this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class); + $token = 'token1234'; $tk = new DefaultToken(); $tk->setPassword('someencryptedvalue'); @@ -209,9 +211,10 @@ public function testSetPassword() { } /** - * @expectedException \OC\Authentication\Exceptions\InvalidTokenException */ public function testSetPasswordInvalidToken() { + $this->expectException(\OC\Authentication\Exceptions\InvalidTokenException::class); + $token = $this->createMock('\OC\Authentication\Token\IToken'); $tokenId = 'token123'; $password = '123456'; diff --git a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php index f54f9951b294..c3f9a4674991 100644 --- a/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php +++ b/tests/lib/Authentication/TwoFactorAuth/ManagerTest.php @@ -93,10 +93,11 @@ private function prepareProviders() { } /** - * @expectedException \Exception - * @expectedExceptionMessage Could not load two-factor auth provider \OCA\MyFaulty2faApp\DoesNotExist */ public function testFailHardIfProviderCanNotBeLoaded() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Could not load two-factor auth provider \\OCA\\MyFaulty2faApp\\DoesNotExist'); + $this->appManager->expects($this->once()) ->method('getEnabledAppsForUser') ->with($this->user) diff --git a/tests/lib/AvatarManagerTest.php b/tests/lib/AvatarManagerTest.php index 55e5e428f778..faf22b1f6194 100644 --- a/tests/lib/AvatarManagerTest.php +++ b/tests/lib/AvatarManagerTest.php @@ -79,10 +79,11 @@ public function setUp(): void { } /** - * @expectedException \Exception - * @expectedExceptionMessage user does not exist */ public function testGetAvatarInvalidUser() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('user does not exist'); + $this->rootFolder = $this->createMock(IRootFolder::class); $this->rootFolder->expects(self::never()) ->method('get'); diff --git a/tests/lib/CapabilitiesManagerTest.php b/tests/lib/CapabilitiesManagerTest.php index 1d08d232c676..8afa1a8b5f92 100644 --- a/tests/lib/CapabilitiesManagerTest.php +++ b/tests/lib/CapabilitiesManagerTest.php @@ -48,10 +48,11 @@ public function testValidCapability() { /** * Test that we need something that implents ICapability - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The given Capability (Test\NoCapability) does not implement the ICapability interface */ public function testNoICapability() { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('The given Capability (Test\\NoCapability) does not implement the ICapability interface'); + $manager = new \OC\CapabilitiesManager(); $manager->registerCapability(function () { diff --git a/tests/lib/Command/User/SyncBackendTest.php b/tests/lib/Command/User/SyncBackendTest.php index 0f4edd085266..0fa223a0a381 100644 --- a/tests/lib/Command/User/SyncBackendTest.php +++ b/tests/lib/Command/User/SyncBackendTest.php @@ -268,9 +268,10 @@ public function testExecute($uid, $expected) { } /** - * @expectedException \LengthException */ public function testSingleUserSyncExistingUserException() { + $this->expectException(\LengthException::class); + $inputInterface = $this->createMock(InputInterface::class); $outputInterface = $this->createMock(OutputInterface::class); $syncService = $this->createMock(SyncService::class); diff --git a/tests/lib/Comments/CommentTest.php b/tests/lib/Comments/CommentTest.php index 1019c060cb33..39f1c9aecbef 100644 --- a/tests/lib/Comments/CommentTest.php +++ b/tests/lib/Comments/CommentTest.php @@ -44,9 +44,10 @@ public function testSettersValidInput() { } /** - * @expectedException \OCP\Comments\IllegalIDChangeException */ public function testSetIdIllegalInput() { + $this->expectException(\OCP\Comments\IllegalIDChangeException::class); + $comment = new \OC\Comments\Comment(); $comment->setId('c23'); @@ -74,9 +75,10 @@ public function simpleSetterProvider() { /** * @dataProvider simpleSetterProvider - * @expectedException \InvalidArgumentException */ public function testSimpleSetterInvalidInput($field, $input) { + $this->expectException(\InvalidArgumentException::class); + $comment = new \OC\Comments\Comment(); $setter = 'set' . $field; @@ -98,18 +100,20 @@ public function roleSetterProvider() { /** * @dataProvider roleSetterProvider - * @expectedException \InvalidArgumentException */ public function testSetRoleInvalidInput($role, $type, $id) { + $this->expectException(\InvalidArgumentException::class); + $comment = new \OC\Comments\Comment(); $setter = 'set' . $role; $comment->$setter($type, $id); } /** - * @expectedException \OCP\Comments\MessageTooLongException */ public function testSetUberlongMessage() { + $this->expectException(\OCP\Comments\MessageTooLongException::class); + $comment = new \OC\Comments\Comment(); $msg = \str_pad('', IComment::MAX_MESSAGE_LENGTH + 1, 'x'); $comment->setMessage($msg); diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php index cf312f5e95f9..72bb049dcd1a 100644 --- a/tests/lib/Comments/ManagerTest.php +++ b/tests/lib/Comments/ManagerTest.php @@ -70,17 +70,19 @@ protected function getManager() { } /** - * @expectedException \OCP\Comments\NotFoundException */ public function testGetCommentNotFound() { + $this->expectException(\OCP\Comments\NotFoundException::class); + $manager = $this->getManager(); $manager->get('22'); } /** - * @expectedException \InvalidArgumentException */ public function testGetCommentNotFoundInvalidInput() { + $this->expectException(\InvalidArgumentException::class); + $manager = $this->getManager(); $manager->get('unexisting22'); } @@ -128,17 +130,19 @@ public function testGetComment() { } /** - * @expectedException \OCP\Comments\NotFoundException */ public function testGetTreeNotFound() { + $this->expectException(\OCP\Comments\NotFoundException::class); + $manager = $this->getManager(); $manager->getTree('22'); } /** - * @expectedException \InvalidArgumentException */ public function testGetTreeNotFoundInvalidIpnut() { + $this->expectException(\InvalidArgumentException::class); + $manager = $this->getManager(); $manager->getTree('unexisting22'); } @@ -383,9 +387,10 @@ public function invalidCreateArgsProvider() { /** * @dataProvider invalidCreateArgsProvider - * @expectedException \InvalidArgumentException */ public function testCreateCommentInvalidArguments($aType, $aId, $oType, $oId) { + $this->expectException(\InvalidArgumentException::class); + $manager = $this->getManager(); $manager->create($aType, $aId, $oType, $oId); } @@ -405,9 +410,10 @@ public function testCreateComment() { } /** - * @expectedException \OCP\Comments\NotFoundException */ public function testDelete() { + $this->expectException(\OCP\Comments\NotFoundException::class); + $manager = $this->getManager(); $done = $manager->delete('404'); @@ -507,9 +513,10 @@ public function testSaveUpdate() { } /** - * @expectedException \OCP\Comments\NotFoundException */ public function testSaveUpdateException() { + $this->expectException(\OCP\Comments\NotFoundException::class); + $calledBeforeDeleteEvent = []; $calledAfterDeleteEvent = []; \OC::$server->getEventDispatcher()->addListener('comment.beforedelete', function (GenericEvent $event) use (&$calledBeforeDeleteEvent) { @@ -545,9 +552,10 @@ public function testSaveUpdateException() { } /** - * @expectedException \UnexpectedValueException */ public function testSaveIncomplete() { + $this->expectException(\UnexpectedValueException::class); + $manager = $this->getManager(); $comment = new \OC\Comments\Comment(); $comment->setMessage('from no one to nothing'); @@ -590,9 +598,10 @@ public function invalidActorArgsProvider() { /** * @dataProvider invalidActorArgsProvider - * @expectedException \InvalidArgumentException */ public function testDeleteReferencesOfActorInvalidInput($type, $id) { + $this->expectException(\InvalidArgumentException::class); + $manager = $this->getManager(); $manager->deleteReferencesOfActor($type, $id); } @@ -656,9 +665,10 @@ public function invalidObjectArgsProvider() { /** * @dataProvider invalidObjectArgsProvider - * @expectedException \InvalidArgumentException */ public function testDeleteCommentsAtObjectInvalidInput($type, $id) { + $this->expectException(\InvalidArgumentException::class); + $manager = $this->getManager(); $manager->deleteCommentsAtObject($type, $id); } diff --git a/tests/lib/DB/ConnectionTest.php b/tests/lib/DB/ConnectionTest.php index 3aac3f362c97..0f50c1fa0e23 100644 --- a/tests/lib/DB/ConnectionTest.php +++ b/tests/lib/DB/ConnectionTest.php @@ -159,9 +159,10 @@ public function testSetValuesOverWritePrecondition() { } /** - * @expectedException \OCP\PreConditionNotMetException */ public function testSetValuesOverWritePreconditionFailed() { + $this->expectException(\OCP\PreConditionNotMetException::class); + $this->makeTestTable(); $this->connection->setValues('table', [ 'integerfield' => 1 diff --git a/tests/lib/DB/LegacyDBTest.php b/tests/lib/DB/LegacyDBTest.php index 85a7bc31f4ae..cf421c7c8f53 100644 --- a/tests/lib/DB/LegacyDBTest.php +++ b/tests/lib/DB/LegacyDBTest.php @@ -241,11 +241,12 @@ public function insertIfNotExistsViolatingThrows() { /** * @dataProvider insertIfNotExistsViolatingThrows - * @expectedException \Doctrine\DBAL\Exception\UniqueConstraintViolationException * * @param array $compareKeys */ public function testInsertIfNotExistsViolatingThrows($compareKeys) { + $this->expectException(\Doctrine\DBAL\Exception\UniqueConstraintViolationException::class); + $result = \OCP\DB::insertIfNotExist('*PREFIX*'.$this->table5, [ 'storage' => 1, diff --git a/tests/lib/DB/MigrationsTest.php b/tests/lib/DB/MigrationsTest.php index ea0dfbfaa3ed..c2d779e89221 100644 --- a/tests/lib/DB/MigrationsTest.php +++ b/tests/lib/DB/MigrationsTest.php @@ -53,26 +53,29 @@ public function testCore() { } /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Version 20170130180000 is unknown. */ public function testExecuteUnknownStep() { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Version 20170130180000 is unknown.'); + $this->migrationService->executeStep('20170130180000'); } /** - * @expectedException \Exception - * @expectedExceptionMessage App not found */ public function testUnknownApp() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('App not found'); + $migrationService = new MigrationService('unknown-bloody-app', $this->db); } /** - * @expectedException \Exception - * @expectedExceptionMessage Migration step 'X' is unknown */ public function testExecuteStepWithUnknownClass() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Migration step \'X\' is unknown'); + $this->migrationService = $this->getMockBuilder(MigrationService::class) ->setMethods(['findMigrations']) ->setConstructorArgs(['files_sharing', $this->db]) diff --git a/tests/lib/DateTimeFormatterTest.php b/tests/lib/DateTimeFormatterTest.php index 0e8ac6dcbe22..b2421252e47e 100644 --- a/tests/lib/DateTimeFormatterTest.php +++ b/tests/lib/DateTimeFormatterTest.php @@ -167,9 +167,10 @@ public function testFormatDateTime($timestamp, $timeZone, $expected) { } /** - * @expectedException \Exception */ public function testFormatDateWithInvalidTZ() { + $this->expectException(\Exception::class); + $this->formatter->formatDate(1350129205, 'long', new \DateTimeZone('Mordor/Barad-dûr')); } } diff --git a/tests/lib/Encryption/ManagerTest.php b/tests/lib/Encryption/ManagerTest.php index c77bfd50b8ed..3c997bc487d0 100644 --- a/tests/lib/Encryption/ManagerTest.php +++ b/tests/lib/Encryption/ManagerTest.php @@ -76,10 +76,11 @@ public function testModuleRegistration() { /** * @depends testModuleRegistration - * @expectedException \OC\Encryption\Exceptions\ModuleAlreadyExistsException - * @expectedExceptionMessage Id "ID0" already used by encryption module "TestDummyModule0" */ public function testModuleReRegistration($manager) { + $this->expectException(\OC\Encryption\Exceptions\ModuleAlreadyExistsException::class); + $this->expectExceptionMessage('Id "ID0" already used by encryption module "TestDummyModule0"'); + $this->addNewEncryptionModule($manager, 0); } @@ -93,10 +94,11 @@ public function testModuleUnRegistration() { } /** - * @expectedException \OC\Encryption\Exceptions\ModuleDoesNotExistsException - * @expectedExceptionMessage Module with id: unknown does not exist. */ public function testGetEncryptionModuleUnknown() { + $this->expectException(\OC\Encryption\Exceptions\ModuleDoesNotExistsException::class); + $this->expectExceptionMessage('Module with id: unknown does not exist.'); + $this->config->expects($this->any())->method('getAppValue')->willReturn(true); $this->addNewEncryptionModule($this->manager, 0); $this->assertCount(1, $this->manager->getEncryptionModules()); diff --git a/tests/lib/Encryption/UtilTest.php b/tests/lib/Encryption/UtilTest.php index 73adb6621e2d..0e4d21f0bd86 100644 --- a/tests/lib/Encryption/UtilTest.php +++ b/tests/lib/Encryption/UtilTest.php @@ -92,9 +92,10 @@ public function providesHeaders() { } /** - * @expectedException \OC\Encryption\Exceptions\EncryptionHeaderKeyExistsException */ public function testCreateHeaderFailed() { + $this->expectException(\OC\Encryption\Exceptions\EncryptionHeaderKeyExistsException::class); + $header = ['header1' => 1, 'header2' => 2, 'oc_encryption_module' => 'foo']; $em = $this->createMock('\OCP\Encryption\IEncryptionModule'); diff --git a/tests/lib/Files/Cache/ScannerTest.php b/tests/lib/Files/Cache/ScannerTest.php index 4ad8f8cf3e49..def748e105fd 100644 --- a/tests/lib/Files/Cache/ScannerTest.php +++ b/tests/lib/Files/Cache/ScannerTest.php @@ -399,8 +399,6 @@ public function testFailGetData($isHomeStorage, $isSharedStorage, $scanPath, $ex } /** - * @expectedException \Exception - * @expectedExceptionMessage No MetaData * * @throws \OCP\Files\StorageNotAvailableException * @throws \OCP\Lock\LockedException @@ -408,6 +406,9 @@ public function testFailGetData($isHomeStorage, $isSharedStorage, $scanPath, $ex * @throws \OC\ServerNotAvailableException */ public function testUnLockInCaseOfExceptionInScanFile() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('No MetaData'); + /** @var Storage | \PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->createMock(Storage::class); $storage->expects($this->any()) @@ -424,8 +425,6 @@ public function testUnLockInCaseOfExceptionInScanFile() { } /** - * @expectedException \Exception - * @expectedExceptionMessage No MetaData * * @throws \OCP\Files\StorageNotAvailableException * @throws \OCP\Lock\LockedException @@ -433,6 +432,9 @@ public function testUnLockInCaseOfExceptionInScanFile() { * @throws \OC\ServerNotAvailableException */ public function testUnLockInCaseOfExceptionInScan() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('No MetaData'); + /** @var Storage | \PHPUnit\Framework\MockObject\MockObject $storage */ $storage = $this->createMock(Storage::class); $storage->expects($this->any()) diff --git a/tests/lib/Files/External/Auth/Password/SessionCredentialsTest.php b/tests/lib/Files/External/Auth/Password/SessionCredentialsTest.php index 650d5fd74a1a..3a36745ca3b2 100644 --- a/tests/lib/Files/External/Auth/Password/SessionCredentialsTest.php +++ b/tests/lib/Files/External/Auth/Password/SessionCredentialsTest.php @@ -108,9 +108,10 @@ public function testManipulateStorageConfigSetsBackendOptions($sessionData, $use } /** - * @expectedException \OCP\Files\External\InsufficientDataForMeaningfulAnswerException */ public function testManipulateStorageConfigFailsWhenEmptyCredentials() { + $this->expectException(\OCP\Files\External\InsufficientDataForMeaningfulAnswerException::class); + $storageConfig = $this->createMock(IStorageConfig::class); $user = $this->createMock(IUser::class); diff --git a/tests/lib/Files/External/InvalidStorageTest.php b/tests/lib/Files/External/InvalidStorageTest.php index 187801bd60fe..2ae7cfde4668 100644 --- a/tests/lib/Files/External/InvalidStorageTest.php +++ b/tests/lib/Files/External/InvalidStorageTest.php @@ -26,9 +26,10 @@ class InvalidStorageTest extends TestCase { /** - * @expectedException OCP\Files\StorageNotAvailableException */ public function testCannotInstantiate() { + $this->expectException(\OCP\Files\StorageNotAvailableException::class); + new InvalidStorage([]); } } diff --git a/tests/lib/Files/External/Service/StoragesServiceTest.php b/tests/lib/Files/External/Service/StoragesServiceTest.php index 907fd333e128..06796ae0c1ad 100644 --- a/tests/lib/Files/External/Service/StoragesServiceTest.php +++ b/tests/lib/Files/External/Service/StoragesServiceTest.php @@ -233,9 +233,10 @@ protected function makeStorageConfig($data) { } /** - * @expectedException \OCP\Files\External\NotFoundException */ public function testNonExistingStorage() { + $this->expectException(\OCP\Files\External\NotFoundException::class); + $backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); $storage = new StorageConfig(255); @@ -317,9 +318,10 @@ public function testDeleteStorage($backendOptions, $rustyStorageId, $expectedCou } /** - * @expectedException \OCP\Files\External\NotFoundException */ public function testDeleteUnexistingStorage() { + $this->expectException(\OCP\Files\External\NotFoundException::class); + $this->service->removeStorage(255); } @@ -498,9 +500,10 @@ public function testUpdateStorageMountPoint() { } /** - * @expectedException OCP\Files\External\NotFoundException */ public function testCannotEditInvalidBackend() { + $this->expectException(\OCP\Files\External\NotFoundException::class); + $backend = $this->backendService->getBackend('identifier:\Test\Files\External\Backend\DummyBackend'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); diff --git a/tests/lib/Files/External/Service/UserGlobalStoragesServiceTest.php b/tests/lib/Files/External/Service/UserGlobalStoragesServiceTest.php index 3c3258ed354c..18c9ce74b4b4 100644 --- a/tests/lib/Files/External/Service/UserGlobalStoragesServiceTest.php +++ b/tests/lib/Files/External/Service/UserGlobalStoragesServiceTest.php @@ -153,9 +153,10 @@ public function testGetStorageWithApplicable($applicableUsers, $applicableGroups } /** - * @expectedException \DomainException */ public function testAddStorage($storageParams = null) { + $this->expectException(\DomainException::class); + $backend = $this->backendService->getBackend('identifier:\Test\Files\External\Backend\DummyBackend'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); @@ -169,9 +170,10 @@ public function testAddStorage($storageParams = null) { } /** - * @expectedException \DomainException */ public function testUpdateStorage($storageParams = null) { + $this->expectException(\DomainException::class); + $backend = $this->backendService->getBackend('identifier:\Test\Files\External\Backend\DummyBackend'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); @@ -189,17 +191,19 @@ public function testUpdateStorage($storageParams = null) { } /** - * @expectedException \DomainException */ public function testNonExistingStorage() { + $this->expectException(\DomainException::class); + parent::testNonExistingStorage(); } /** - * @expectedException \DomainException * @dataProvider deleteStorageDataProvider */ public function testDeleteStorage($backendOptions, $rustyStorageId, $expectedCountAfterDeletion) { + $this->expectException(\DomainException::class); + $backend = $this->backendService->getBackend('identifier:\Test\Files\External\Backend\DummyBackend'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); @@ -216,9 +220,10 @@ public function testDeleteStorage($backendOptions, $rustyStorageId, $expectedCou } /** - * @expectedException \DomainException */ public function testDeleteUnexistingStorage() { + $this->expectException(\DomainException::class); + parent::testDeleteUnexistingStorage(); } diff --git a/tests/lib/Files/External/Service/UserStoragesServiceTest.php b/tests/lib/Files/External/Service/UserStoragesServiceTest.php index 03c16f49c3e5..c3ed4d9e62c4 100644 --- a/tests/lib/Files/External/Service/UserStoragesServiceTest.php +++ b/tests/lib/Files/External/Service/UserStoragesServiceTest.php @@ -189,9 +189,10 @@ public function testHooksRenameMountPoint() { } /** - * @expectedException \OCP\Files\External\NotFoundException */ public function testGetAdminStorage() { + $this->expectException(\OCP\Files\External\NotFoundException::class); + $backend = $this->backendService->getBackend('identifier:\Test\Files\External\Backend\DummyBackend'); $authMechanism = $this->backendService->getAuthMechanism('identifier:\Auth\Mechanism'); diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php index 8adf1140708c..b442f103f278 100644 --- a/tests/lib/Files/FilesystemTest.php +++ b/tests/lib/Files/FilesystemTest.php @@ -340,18 +340,20 @@ public function testHooks() { /** * Tests that an exception is thrown when passed user does not exist. * - * @expectedException \OC\User\NoUserException */ public function testLocalMountWhenUserDoesNotExist() { + $this->expectException(\OC\User\NoUserException::class); + $userId = $this->getUniqueID('user_'); Filesystem::initMountPoints($userId); } /** - * @expectedException \OC\User\NoUserException */ public function testNullUserThrows() { + $this->expectException(\OC\User\NoUserException::class); + Filesystem::initMountPoints(null); } diff --git a/tests/lib/Files/MetaFilesTest.php b/tests/lib/Files/MetaFilesTest.php index c65b57f87149..e37eb3ea35f7 100644 --- a/tests/lib/Files/MetaFilesTest.php +++ b/tests/lib/Files/MetaFilesTest.php @@ -155,9 +155,10 @@ public function testMetaRootGetById() { } /** - * @expectedException OCP\Files\NotFoundException */ public function testMetaRootGetNotFound() { + $this->expectException(\OCP\Files\NotFoundException::class); + $info = $this->createFile(); $metaRoot = \OC::$server->getRootFolder(); diff --git a/tests/lib/Files/MetaVersionCollectionTest.php b/tests/lib/Files/MetaVersionCollectionTest.php index 8df8b3696381..52978ad5619c 100644 --- a/tests/lib/Files/MetaVersionCollectionTest.php +++ b/tests/lib/Files/MetaVersionCollectionTest.php @@ -138,9 +138,10 @@ public function testGet() { } /** - * @expectedException OCP\Files\NotFoundException */ public function testGetNonVersionedStorageFails() { + $this->expectException(\OCP\Files\NotFoundException::class); + $this->node->method('getInternalPath')->willReturn('/abc'); $this->node->method('getMimetype')->willReturn('application/json'); @@ -155,9 +156,10 @@ public function testGetNonVersionedStorageFails() { } /** - * @expectedException OCP\Files\NotFoundException */ public function testGetSubEntryFails() { + $this->expectException(\OCP\Files\NotFoundException::class); + $this->storage->expects($this->never()) ->method('instanceOfStorage'); diff --git a/tests/lib/Files/Node/AbstractFileTest.php b/tests/lib/Files/Node/AbstractFileTest.php index 70d077bbc86a..e26d2adcf820 100644 --- a/tests/lib/Files/Node/AbstractFileTest.php +++ b/tests/lib/Files/Node/AbstractFileTest.php @@ -35,10 +35,11 @@ public function testMime() { } /** - * @expectedException \OCP\Files\NotPermittedException * @dataProvider providesOperations */ public function testOperations($operation) { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** @var AbstractFile | \PHPUnit\Framework\MockObject\MockObject $node */ $node = $this->getMockForAbstractClass(AbstractFile::class); $node->$operation(''); diff --git a/tests/lib/Files/Node/AbstractFolderTest.php b/tests/lib/Files/Node/AbstractFolderTest.php index 12f59b3a0d47..4d817d6a439d 100644 --- a/tests/lib/Files/Node/AbstractFolderTest.php +++ b/tests/lib/Files/Node/AbstractFolderTest.php @@ -35,10 +35,11 @@ public function testMimeAndGetType() { } /** - * @expectedException \OCP\Files\NotPermittedException * @dataProvider providesOperations */ public function testOperations($operation) { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** @var AbstractFolder | \PHPUnit\Framework\MockObject\MockObject $node */ $node = $this->getMockForAbstractClass(AbstractFolder::class); $node->$operation('', ''); diff --git a/tests/lib/Files/Node/AbstractNodeTest.php b/tests/lib/Files/Node/AbstractNodeTest.php index c0fca4c79db8..a4b81cb7cbfd 100644 --- a/tests/lib/Files/Node/AbstractNodeTest.php +++ b/tests/lib/Files/Node/AbstractNodeTest.php @@ -34,10 +34,11 @@ public function testMime() { } /** - * @expectedException \OCP\Files\NotPermittedException * @dataProvider providesOperations */ public function testOperations($operation) { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** @var AbstractNode | \PHPUnit\Framework\MockObject\MockObject $node */ $node = $this->getMockForAbstractClass(AbstractNode::class); $node->$operation(''); diff --git a/tests/lib/Files/Node/FileTest.php b/tests/lib/Files/Node/FileTest.php index 8777b88e3050..69092e18d5bb 100644 --- a/tests/lib/Files/Node/FileTest.php +++ b/tests/lib/Files/Node/FileTest.php @@ -62,9 +62,10 @@ public function testGetContent() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testGetContentNotPermitted() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** @var View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); /** @var Root | \PHPUnit\Framework\MockObject\MockObject $root */ @@ -108,9 +109,10 @@ public function testPutContent() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testPutContentNotPermitted() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** @var View | \PHPUnit\Framework\MockObject\MockObject $view */ $view = $this->createMock(View::class); /** @var Root | \PHPUnit\Framework\MockObject\MockObject $root */ @@ -219,9 +221,10 @@ public function testFOpenWrite() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testFOpenReadNotPermitted() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** * @var Manager $manager */ @@ -246,9 +249,10 @@ public function testFOpenReadNotPermitted() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testFOpenReadWriteNoReadPermissions() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** * @var Manager $manager */ @@ -273,9 +277,10 @@ public function testFOpenReadWriteNoReadPermissions() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testFOpenReadWriteNoWritePermissions() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** * @var Manager $manager */ diff --git a/tests/lib/Files/Node/FolderTest.php b/tests/lib/Files/Node/FolderTest.php index ea12a391e3d4..dbfb86a31c31 100644 --- a/tests/lib/Files/Node/FolderTest.php +++ b/tests/lib/Files/Node/FolderTest.php @@ -161,9 +161,10 @@ public function testNewFolder() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testNewFolderNotPermitted() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $manager = $this->createMock('\OC\Files\Mount\Manager'); /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view @@ -215,9 +216,10 @@ public function testNewFile() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testNewFileNotPermitted() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $manager = $this->createMock('\OC\Files\Mount\Manager'); /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view diff --git a/tests/lib/Files/Node/NodeTest.php b/tests/lib/Files/Node/NodeTest.php index 53e349c4a94c..e71d09fa1968 100644 --- a/tests/lib/Files/Node/NodeTest.php +++ b/tests/lib/Files/Node/NodeTest.php @@ -129,9 +129,10 @@ public function testDeleteHooks() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testDeleteNotPermitted() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ @@ -435,9 +436,10 @@ public function testTouchHooks() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testTouchNotPermitted() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ @@ -457,9 +459,10 @@ public function testTouchNotPermitted() { } /** - * @expectedException \OCP\Files\InvalidPathException */ public function testInvalidPath() { + $this->expectException(\OCP\Files\InvalidPathException::class); + /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ @@ -503,9 +506,10 @@ public function testCopySameStorage() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testCopyNotPermitted() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ @@ -539,9 +543,10 @@ public function testCopyNotPermitted() { } /** - * @expectedException \OCP\Files\NotFoundException */ public function testCopyNoParent() { + $this->expectException(\OCP\Files\NotFoundException::class); + /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ @@ -562,9 +567,10 @@ public function testCopyNoParent() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testCopyParentIsFile() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ @@ -710,9 +716,10 @@ public function testMoveCopyHooks($operationMethod, $viewMethod, $preHookName, $ } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testMoveNotPermitted() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ @@ -738,9 +745,10 @@ public function testMoveNotPermitted() { } /** - * @expectedException \OCP\Files\NotFoundException */ public function testMoveNoParent() { + $this->expectException(\OCP\Files\NotFoundException::class); + /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ @@ -765,9 +773,10 @@ public function testMoveNoParent() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testMoveParentIsFile() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view @@ -790,9 +799,10 @@ public function testMoveParentIsFile() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testMoveFailed() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ @@ -819,9 +829,10 @@ public function testMoveFailed() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testCopyFailed() { + $this->expectException(\OCP\Files\NotPermittedException::class); + /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view */ diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php index d92616d7b9b8..98fcf11ed0e3 100644 --- a/tests/lib/Files/Node/RootTest.php +++ b/tests/lib/Files/Node/RootTest.php @@ -55,9 +55,10 @@ public function testGet() { } /** - * @expectedException \OCP\Files\NotFoundException */ public function testGetNotFound() { + $this->expectException(\OCP\Files\NotFoundException::class); + $manager = new Manager(); /** * @var \OC\Files\Storage\Storage $storage @@ -79,9 +80,10 @@ public function testGetNotFound() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testGetInvalidPath() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $manager = new Manager(); /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view @@ -93,9 +95,10 @@ public function testGetInvalidPath() { } /** - * @expectedException \OCP\Files\NotFoundException */ public function testGetNoStorages() { + $this->expectException(\OCP\Files\NotFoundException::class); + $manager = new Manager(); /** * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view @@ -107,9 +110,10 @@ public function testGetNoStorages() { } /** - * @expectedException \OC\User\NoUserException */ public function testGetUserFolder() { + $this->expectException(\OC\User\NoUserException::class); + $this->logout(); $manager = new Manager(); /** diff --git a/tests/lib/Files/ObjectStore/ObjectStoreTest.php b/tests/lib/Files/ObjectStore/ObjectStoreTest.php index bb3b572789a9..46b5065b25e7 100644 --- a/tests/lib/Files/ObjectStore/ObjectStoreTest.php +++ b/tests/lib/Files/ObjectStore/ObjectStoreTest.php @@ -156,9 +156,10 @@ public function testMoveFromStorageWithObjectStore() { /** * @dataProvider providesMethods - * @expectedException \OCP\Files\NotFoundException */ public function testGetVersionsOfUnknownFile($method, $ignore = false) { + $this->expectException(\OCP\Files\NotFoundException::class); + if ($ignore) { throw new NotFoundException(); } diff --git a/tests/lib/Files/PathVerificationTest.php b/tests/lib/Files/PathVerificationTest.php index 950a22b06855..026c6cf361ca 100644 --- a/tests/lib/Files/PathVerificationTest.php +++ b/tests/lib/Files/PathVerificationTest.php @@ -31,20 +31,22 @@ protected function setUp(): void { } /** - * @expectedException \OCP\Files\InvalidPathException - * @expectedExceptionMessage File name is too long */ public function testPathVerificationFileNameTooLong() { + $this->expectException(\OCP\Files\InvalidPathException::class); + $this->expectExceptionMessage('File name is too long'); + $fileName = \str_repeat('a', 500); $this->view->verifyPath('', $fileName); } /** * @dataProvider providesEmptyFiles - * @expectedException \OCP\Files\InvalidPathException - * @expectedExceptionMessage Empty filename is not allowed */ public function testPathVerificationEmptyFileName($fileName) { + $this->expectException(\OCP\Files\InvalidPathException::class); + $this->expectExceptionMessage('Empty filename is not allowed'); + $this->view->verifyPath('', $fileName); } @@ -57,10 +59,11 @@ public function providesEmptyFiles() { /** * @dataProvider providesDotFiles - * @expectedException \OCP\Files\InvalidPathException - * @expectedExceptionMessage Dot files are not allowed */ public function testPathVerificationDotFiles($fileName) { + $this->expectException(\OCP\Files\InvalidPathException::class); + $this->expectExceptionMessage('Dot files are not allowed'); + $this->view->verifyPath('', $fileName); } @@ -101,9 +104,10 @@ public function providesAstralPlane() { /** * @dataProvider providesInvalidCharsPosix - * @expectedException \OCP\Files\InvalidCharacterInPathException */ public function testPathVerificationInvalidCharsPosix($fileName) { + $this->expectException(\OCP\Files\InvalidCharacterInPathException::class); + $storage = new Local(['datadir' => '']); $fileName = " 123{$fileName}456 "; diff --git a/tests/lib/Files/Storage/DavTest.php b/tests/lib/Files/Storage/DavTest.php index 998b95fdaa21..d8ecd327e3d3 100644 --- a/tests/lib/Files/Storage/DavTest.php +++ b/tests/lib/Files/Storage/DavTest.php @@ -185,9 +185,10 @@ public function invalidConfigDataProvider() { /** * @dataProvider invalidConfigDataProvider - * @expectedException \InvalidArgumentException */ public function testInstantiateWebDavClientInvalidConfig($params) { + $this->expectException(\InvalidArgumentException::class); + new \OC\Files\Storage\DAV($params); } @@ -284,9 +285,10 @@ public function testMkdirAlreadyExists() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testMkdirException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->davClient->expects($this->once()) ->method('request') ->with('MKCOL', 'new%25dir', null) @@ -314,9 +316,10 @@ public function testRmdirUnexist() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testRmdirException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->davClient->expects($this->once()) ->method('request') ->with('DELETE', 'old%25dir', null) @@ -375,9 +378,10 @@ public function testOpenDirNotFound2() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testOpenDirException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->davClient->expects($this->once()) ->method('propfind') ->with('some%25dir', [], 1) @@ -430,9 +434,10 @@ public function testFileTypeNotFound() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testFileTypeException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->davClient->expects($this->once()) ->method('propfind') ->with('some%25dir/file%25type', $this->contains('{DAV:}resourcetype')) @@ -466,9 +471,10 @@ public function testFileExistsDoesNot() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testFileExistsException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->davClient->expects($this->once()) ->method('propfind') ->with('some%25dir/file%25.txt') @@ -505,9 +511,10 @@ public function testUnlinkUnexist2() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testUnlinkException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->davClient->expects($this->once()) ->method('request') ->with('DELETE', 'old%25file.txt', null) @@ -567,9 +574,10 @@ public function testFopenReadNotFound() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testFopenReadException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->httpClient->expects($this->once()) ->method('get') ->with( @@ -591,9 +599,10 @@ public function testFopenReadException() { } /** - * @expectedException \OCP\Lock\LockedException */ public function testFopenReadLockedException() { + $this->expectException(\OCP\Lock\LockedException::class); + $response = $this->createMock(\GuzzleHttp\Message\ResponseInterface::class); $response->method('getStatusCode')->willReturn(Http::STATUS_LOCKED); $response->method('getBody')->willReturn(\fopen('data://text/plain,response body', 'r')); @@ -715,9 +724,10 @@ public function testFopenWriteExistingFileNoPermission() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testFopenWriteExceptionEarly() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + // file_exists, and cached response for isUpdatable / getPermissions $this->davClient->expects($this->once()) ->method('propfind') @@ -731,9 +741,10 @@ public function testFopenWriteExceptionEarly() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testFopenWriteExceptionLate() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + // file_exists, and cached response for isUpdatable / getPermissions $this->davClient->expects($this->once()) ->method('propfind') @@ -859,9 +870,10 @@ public function testTouchNonExisting() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testTouchException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + // file_exists $this->davClient->expects($this->at(0)) ->method('propfind') @@ -977,9 +989,10 @@ public function testStatRoot() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testStatException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->davClient->expects($this->once()) ->method('propfind') ->willThrowException($this->createClientHttpException(Http::STATUS_FORBIDDEN)); @@ -1029,9 +1042,10 @@ public function testMimeType($davResponse, $apiResponse) { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testMimeTypeException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->davClient->expects($this->once()) ->method('propfind') ->willThrowException($this->createClientHttpException(Http::STATUS_FORBIDDEN)); @@ -1111,9 +1125,10 @@ public function testGetPermissionsUnexist() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testGetPermissionsException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->davClient->expects($this->once()) ->method('propfind') ->willThrowException($this->createClientHttpException(Http::STATUS_FORBIDDEN)); @@ -1153,9 +1168,10 @@ public function testGetEtagUnexist() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testGetEtagException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->davClient->expects($this->once()) ->method('propfind') ->with('some%25dir', $this->contains('{DAV:}getetag')) @@ -1299,9 +1315,10 @@ public function testHasUpdatedPathNotfound() { } /** - * @expectedException \OCP\Files\StorageNotAvailableException */ public function testHasUpdatedRootPathNotfound() { + $this->expectException(\OCP\Files\StorageNotAvailableException::class); + $this->davClient->expects($this->once()) ->method('propfind') ->willReturn(false); @@ -1310,9 +1327,10 @@ public function testHasUpdatedRootPathNotfound() { } /** - * @expectedException \OCP\Files\StorageNotAvailableException */ public function testHasUpdatedRootPathMethodNotAllowed() { + $this->expectException(\OCP\Files\StorageNotAvailableException::class); + $this->davClient->expects($this->once()) ->method('propfind') ->willThrowException($this->createClientHttpException(Http::STATUS_METHOD_NOT_ALLOWED)); @@ -1321,9 +1339,10 @@ public function testHasUpdatedRootPathMethodNotAllowed() { } /** - * @expectedException \OCP\Files\StorageNotAvailableException */ public function testHasUpdatedMethodNotAllowed() { + $this->expectException(\OCP\Files\StorageNotAvailableException::class); + $this->davClient->expects($this->once()) ->method('propfind') ->willThrowException($this->createClientHttpException(Http::STATUS_METHOD_NOT_ALLOWED)); @@ -1332,9 +1351,10 @@ public function testHasUpdatedMethodNotAllowed() { } /** - * @expectedException \OCA\DAV\Connector\Sabre\Exception\Forbidden */ public function testHasUpdatedException() { + $this->expectException(\OCA\DAV\Connector\Sabre\Exception\Forbidden::class); + $this->davClient->expects($this->once()) ->method('propfind') ->willThrowException($this->createClientHttpException(Http::STATUS_FORBIDDEN)); diff --git a/tests/lib/Files/Storage/FolderTest.php b/tests/lib/Files/Storage/FolderTest.php index d8503e79cdec..7787394089c0 100644 --- a/tests/lib/Files/Storage/FolderTest.php +++ b/tests/lib/Files/Storage/FolderTest.php @@ -45,25 +45,28 @@ protected function createTestNode($path, IStorage $storage = null) { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testGetFullPath() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/') ->getFullPath('/'); } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testGetRelativePath() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/') ->getRelativePath('/'); } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testIsSubNode() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/') ->isSubNode(new Folder($this->storage, '/foo')); } @@ -148,33 +151,37 @@ public function testDelete() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testSearch() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/') ->search('/foo'); } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testSearchByMime() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/') ->searchByMime('text/plain'); } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testSearchByTag() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/') ->searchByMime('text/plain'); } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testGetById() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/') ->getById(1); } @@ -190,9 +197,10 @@ public function testGetFreeSpace() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testGetNonExistingName() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/') ->getNonExistingName('name'); } diff --git a/tests/lib/Files/Storage/LocalTest.php b/tests/lib/Files/Storage/LocalTest.php index a9af8d261c9d..85e3f445ce28 100644 --- a/tests/lib/Files/Storage/LocalTest.php +++ b/tests/lib/Files/Storage/LocalTest.php @@ -70,23 +70,26 @@ public function testEtagChange() { } /** - * @expectedException \InvalidArgumentException */ public function testInvalidArgumentsEmptyArray() { + $this->expectException(\InvalidArgumentException::class); + new \OC\Files\Storage\Local([]); } /** - * @expectedException \InvalidArgumentException */ public function testInvalidArgumentsNoArray() { + $this->expectException(\InvalidArgumentException::class); + new \OC\Files\Storage\Local(null); } /** - * @expectedException \OCP\Files\ForbiddenException */ public function testDisallowSymlinksOutsideDatadir() { + $this->expectException(\OCP\Files\ForbiddenException::class); + $subDir1 = $this->tmpDir . 'sub1'; $subDir2 = $this->tmpDir . 'sub2'; $sym = $this->tmpDir . 'sub1/sym'; @@ -116,9 +119,10 @@ public function testAllowSymlinksInsideDatadir() { } /** - * @expectedException \OCP\Files\ForbiddenException */ public function testBrokenSymlink() { + $this->expectException(\OCP\Files\ForbiddenException::class); + $linkTarget = $this->tmpDir . 'link_target'; $linkName = $this->tmpDir . 'broken_symlink'; diff --git a/tests/lib/Files/Storage/NodeTest.php b/tests/lib/Files/Storage/NodeTest.php index 0fddbc7c6178..bed28e750bc6 100644 --- a/tests/lib/Files/Storage/NodeTest.php +++ b/tests/lib/Files/Storage/NodeTest.php @@ -89,9 +89,10 @@ public function testGetType() { } /** - * @expectedException \UnexpectedValueException */ public function testGetTypeUnexpected() { + $this->expectException(\UnexpectedValueException::class); + $this->storage->expects($this->once()) ->method('filetype') ->willReturn('link'); @@ -115,49 +116,55 @@ public function testIsShared() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testIsMounted() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/path') ->isMounted(); } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testGetMountPoint() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/path') ->getMountPoint(); } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testGetOwner() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/path') ->getOwner(); } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testGetChecksum() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/path') ->getChecksum(); } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testMove() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/path') ->move('/target'); } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testCopy() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/path') ->copy('/target'); } @@ -177,9 +184,10 @@ public function testGetStorage() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testGetPath() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/path') ->getPath(); } @@ -190,9 +198,10 @@ public function testGetInternalPath() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testGetId() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/path') ->getId(); } @@ -292,9 +301,10 @@ public function testGetParent() { } /** - * @expectedException \OCP\Files\NotFoundException */ public function testGetParentNotExisting() { + $this->expectException(\OCP\Files\NotFoundException::class); + $root = $this->createTestNode(''); $root->getParent(); } @@ -305,25 +315,28 @@ public function testGetName() { } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testLock() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/path') ->lock(\OCP\Lock\ILockingProvider::LOCK_SHARED); } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testChangeLock() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/path') ->changeLock(\OCP\Lock\ILockingProvider::LOCK_SHARED); } /** - * @expectedException \OCP\Files\NotPermittedException */ public function testUnlock() { + $this->expectException(\OCP\Files\NotPermittedException::class); + $this->createTestNode('/path') ->unlock(\OCP\Lock\ILockingProvider::LOCK_SHARED); } diff --git a/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php b/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php index 9f6fd10d9763..58ebdeff6511 100644 --- a/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php +++ b/tests/lib/Files/Storage/Wrapper/AvailabilityTest.php @@ -49,9 +49,10 @@ public function testAvailable() { /** * Storage marked unavailable, TTL not expired * - * @expectedException \OCP\Files\StorageNotAvailableException */ public function testUnavailable() { + $this->expectException(\OCP\Files\StorageNotAvailableException::class); + list($storage, $wrapper) = $this->getWrapperInstance(); $storage->expects($this->once()) ->method('getAvailability') @@ -90,9 +91,10 @@ public function testUnavailableRecheck() { /** * Storage marked available, but throws StorageNotAvailableException * - * @expectedException \OCP\Files\StorageNotAvailableException */ public function testAvailableThrowStorageNotAvailable() { + $this->expectException(\OCP\Files\StorageNotAvailableException::class); + list($storage, $wrapper) = $this->getWrapperInstance(); $storage->expects($this->once()) ->method('getAvailability') @@ -133,9 +135,10 @@ public function testAvailableFailure() { * Storage available, but throws exception * Standard exception does not indicate storage unavailability * - * @expectedException \Exception */ public function testAvailableThrow() { + $this->expectException(\Exception::class); + list($storage, $wrapper) = $this->getWrapperInstance(); $storage->expects($this->once()) ->method('getAvailability') diff --git a/tests/lib/Files/Utils/ScannerTest.php b/tests/lib/Files/Utils/ScannerTest.php index e8cfc39c47c2..dc38ace6c5da 100644 --- a/tests/lib/Files/Utils/ScannerTest.php +++ b/tests/lib/Files/Utils/ScannerTest.php @@ -153,11 +153,12 @@ public function invalidPathProvider() { /** * @dataProvider invalidPathProvider - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Invalid path to scan * @param string $invalidPath */ public function testInvalidPathScanning($invalidPath) { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid path to scan'); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); $scanner->scan($invalidPath); } diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 6d505b070c4e..fa7d8e469637 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -252,9 +252,10 @@ public function testGetPath() { } /** - * @expectedException \OCP\Files\NotFoundException */ public function testGetPathNotExisting() { + $this->expectException(\OCP\Files\NotFoundException::class); + $storage1 = $this->getTestStorage(); Filesystem::mount($storage1, [], '/'); @@ -1081,9 +1082,10 @@ public function testFileView() { /** * @dataProvider tooLongPathDataProvider - * @expectedException \OCP\Files\InvalidPathException */ public function testTooLongPath($operation, $param0 = null) { + $this->expectException(\OCP\Files\InvalidPathException::class); + $longPath = ''; // 4000 is the maximum path length in file_cache.path $folderName = 'abcdefghijklmnopqrstuvwxyz012345678901234567890123456789'; @@ -1286,10 +1288,11 @@ public function directoryTraversalProvider() { /** * @dataProvider directoryTraversalProvider - * @expectedException \Exception * @param string $root */ public function testConstructDirectoryTraversalException($root) { + $this->expectException(\Exception::class); + new View($root); } @@ -1336,16 +1339,16 @@ public function testGetRelativePathOnNull() { } /** - * @expectedException \InvalidArgumentException */ public function testNullAsRoot() { + $this->expectException(\InvalidArgumentException::class); + new View(null); } /** * e.g. reading from a folder that's being renamed * - * @expectedException \OCP\Lock\LockedException * * @dataProvider dataLockPaths * @@ -1353,6 +1356,8 @@ public function testNullAsRoot() { * @param string $pathPrefix */ public function testReadFromWriteLockedPath($rootPath, $pathPrefix) { + $this->expectException(\OCP\Lock\LockedException::class); + $rootPath = \str_replace('{folder}', 'files', $rootPath); $pathPrefix = \str_replace('{folder}', 'files', $pathPrefix); @@ -1385,7 +1390,6 @@ public function testReadFromWriteUnlockablePath($rootPath, $pathPrefix) { /** * e.g. writing a file that's being downloaded * - * @expectedException \OCP\Lock\LockedException * * @dataProvider dataLockPaths * @@ -1393,6 +1397,8 @@ public function testReadFromWriteUnlockablePath($rootPath, $pathPrefix) { * @param string $pathPrefix */ public function testWriteToReadLockedFile($rootPath, $pathPrefix) { + $this->expectException(\OCP\Lock\LockedException::class); + $rootPath = \str_replace('{folder}', 'files', $rootPath); $pathPrefix = \str_replace('{folder}', 'files', $pathPrefix); @@ -1553,9 +1559,10 @@ public function pathRelativeToFilesProviderExceptionCases() { /** * @dataProvider pathRelativeToFilesProviderExceptionCases - * @expectedException \InvalidArgumentException */ public function testGetPathRelativeToFilesWithInvalidArgument($path) { + $this->expectException(\InvalidArgumentException::class); + $view = new View(); $view->getPathRelativeToFiles($path); } @@ -2199,9 +2206,10 @@ function () use ($view, $sourcePath, $targetPath, &$lockTypeSourceDuring, &$lock * simulate a failed copy operation. * We expect that we catch the exception, free the lock and re-throw it. * - * @expectedException \Exception */ public function testLockFileCopyException() { + $this->expectException(\Exception::class); + $view = new View('/' . $this->user . '/files/'); /** @var Temporary | \PHPUnit\Framework\MockObject\MockObject $storage */ diff --git a/tests/lib/Hooks/BasicEmitterTest.php b/tests/lib/Hooks/BasicEmitterTest.php index 86fce1b241ef..004fa19cd4ee 100644 --- a/tests/lib/Hooks/BasicEmitterTest.php +++ b/tests/lib/Hooks/BasicEmitterTest.php @@ -51,9 +51,10 @@ public static function staticCallBack() { } /** - * @expectedException \Test\Hooks\EmittedException */ public function testAnonymousFunction() { + $this->expectException(\Test\Hooks\EmittedException::class); + $this->emitter->listen('Test', 'test', function () { throw new EmittedException; }); @@ -61,17 +62,19 @@ public function testAnonymousFunction() { } /** - * @expectedException \Test\Hooks\EmittedException */ public function testStaticCallback() { + $this->expectException(\Test\Hooks\EmittedException::class); + $this->emitter->listen('Test', 'test', ['\Test\Hooks\BasicEmitterTest', 'staticCallBack']); $this->emitter->emitEvent('Test', 'test'); } /** - * @expectedException \Test\Hooks\EmittedException */ public function testNonStaticCallback() { + $this->expectException(\Test\Hooks\EmittedException::class); + $this->emitter->listen('Test', 'test', [$this, 'nonStaticCallBack']); $this->emitter->emitEvent('Test', 'test'); } @@ -126,9 +129,10 @@ public function testDifferentCallbacks() { } /** - * @expectedException \Test\Hooks\EmittedException */ public function testArguments() { + $this->expectException(\Test\Hooks\EmittedException::class); + $this->emitter->listen('Test', 'test', function ($foo, $bar) { if ($foo == 'foo' and $bar == 'bar') { throw new EmittedException; @@ -138,9 +142,10 @@ public function testArguments() { } /** - * @expectedException \Test\Hooks\EmittedException */ public function testNamedArguments() { + $this->expectException(\Test\Hooks\EmittedException::class); + $this->emitter->listen('Test', 'test', function ($foo, $bar) { if ($foo == 'foo' and $bar == 'bar') { throw new EmittedException; @@ -217,9 +222,10 @@ public function testRemoveWildcardScopeAndMethod() { } /** - * @expectedException \Test\Hooks\EmittedException */ public function testRemoveKeepOtherCallback() { + $this->expectException(\Test\Hooks\EmittedException::class); + $listener1 = function () { throw new EmittedException; }; @@ -235,9 +241,10 @@ public function testRemoveKeepOtherCallback() { } /** - * @expectedException \Test\Hooks\EmittedException */ public function testRemoveKeepOtherMethod() { + $this->expectException(\Test\Hooks\EmittedException::class); + $listener = function () { throw new EmittedException; }; @@ -250,9 +257,10 @@ public function testRemoveKeepOtherMethod() { } /** - * @expectedException \Test\Hooks\EmittedException */ public function testRemoveKeepOtherScope() { + $this->expectException(\Test\Hooks\EmittedException::class); + $listener = function () { throw new EmittedException; }; @@ -265,9 +273,10 @@ public function testRemoveKeepOtherScope() { } /** - * @expectedException \Test\Hooks\EmittedException */ public function testRemoveNonExistingName() { + $this->expectException(\Test\Hooks\EmittedException::class); + $listener = function () { throw new EmittedException; }; diff --git a/tests/lib/Image/BmpToResourceTest.php b/tests/lib/Image/BmpToResourceTest.php index f0fa109193e5..0e03e841d634 100644 --- a/tests/lib/Image/BmpToResourceTest.php +++ b/tests/lib/Image/BmpToResourceTest.php @@ -42,9 +42,10 @@ public function testReadBitmapHeader() { } /** - * @expectedException \DomainException */ public function testReadWrongBitmapSignature() { + $this->expectException(\DomainException::class); + $headerHex = '99 4D 9A 00 00 00 00 00 00 00 7A 00 00 00'; $headerBin = \hex2bin(\str_replace(' ', '', $headerHex)); $stub = $this->getReadFileStub([$headerBin]); @@ -71,9 +72,10 @@ public function testReadDibHeader() { } /** - * @expectedException \UnexpectedValueException */ public function testReadUnsupportedDibHeaderBitDepth() { + $this->expectException(\UnexpectedValueException::class); + $headerLengthHex = '6C 00 00 00 '; $headerHex = '20 00 00 00 12 00 00 00 01 00 07 00 03 00 00 00 20 00 00 00 14 0B 00 00 13 0B 00 00 00 00 00 00 00 00 00 00'; $headerLengthBin = \hex2bin(\str_replace(' ', '', $headerLengthHex)); @@ -83,9 +85,10 @@ public function testReadUnsupportedDibHeaderBitDepth() { } /** - * @expectedException \UnexpectedValueException */ public function testReadWrongDibHeaderLength() { + $this->expectException(\UnexpectedValueException::class); + $headerHex = '10 00 00 00 00 00 00 00 00 00 7A 00 00 00'; $headerBin = \hex2bin(\str_replace(' ', '', $headerHex)); $stub = $this->getReadFileStub([$headerBin]); diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index afbb88117a45..f3f3885dbd6a 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -86,9 +86,10 @@ public function setUp(): void { } /** - * @expectedException \Exception */ public function testWriteAppSignatureOfNotExistingApp() { + $this->expectException(\Exception::class); + $keyBundle = \file_get_contents(__DIR__ .'/../../data/integritycheck/SomeApp.crt'); $rsaPrivateKey = \file_get_contents(__DIR__ .'/../../data/integritycheck/SomeApp.key'); $rsa = new RSA(); @@ -99,9 +100,10 @@ public function testWriteAppSignatureOfNotExistingApp() { } /** - * @expectedException \Exception */ public function testWriteAppSignatureWrongPermissions() { + $this->expectException(\Exception::class); + $this->fileAccessHelper ->expects($this->once()) ->method('file_put_contents') diff --git a/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php b/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php index a1a3489c79d2..9c86657fd2b3 100644 --- a/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php +++ b/tests/lib/IntegrityCheck/Helpers/AppLocatorTest.php @@ -38,10 +38,11 @@ public function testGetAppPath() { } /** - * @expectedException \Exception - * @expectedExceptionMessage App not found */ public function testGetAppPathNotExistentApp() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('App not found'); + $this->locator->getAppPath('aTotallyNotExistingApp'); } diff --git a/tests/lib/LargeFileHelperTest.php b/tests/lib/LargeFileHelperTest.php index bfe26246918f..697a4966d931 100644 --- a/tests/lib/LargeFileHelperTest.php +++ b/tests/lib/LargeFileHelperTest.php @@ -38,9 +38,10 @@ public function testFormatUnsignedIntegerString() { } /** - * @expectedException \UnexpectedValueException */ public function testFormatUnsignedIntegerStringException() { + $this->expectException(\UnexpectedValueException::class); + $this->helper->formatUnsignedInteger('900ABCD254740993'); } } diff --git a/tests/lib/Lock/LockingProvider.php b/tests/lib/Lock/LockingProvider.php index c6eecf118db8..63a5c1a6c815 100644 --- a/tests/lib/Lock/LockingProvider.php +++ b/tests/lib/Lock/LockingProvider.php @@ -74,9 +74,10 @@ public function testReleaseSharedLock() { } /** - * @expectedException \OCP\Lock\LockedException */ public function testDoubleExclusiveLock() { + $this->expectException(\OCP\Lock\LockedException::class); + $this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE); $this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_EXCLUSIVE)); $this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE); @@ -91,9 +92,10 @@ public function testReleaseExclusiveLock() { } /** - * @expectedException \OCP\Lock\LockedException */ public function testExclusiveLockAfterShared() { + $this->expectException(\OCP\Lock\LockedException::class); + $this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); $this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_SHARED)); $this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE); @@ -164,9 +166,10 @@ public function testReleaseAfterReleaseAll() { } /** - * @expectedException \OCP\Lock\LockedException */ public function testSharedLockAfterExclusive() { + $this->expectException(\OCP\Lock\LockedException::class); + $this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE); $this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_EXCLUSIVE)); $this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); @@ -205,48 +208,54 @@ public function testChangeLockToShared() { } /** - * @expectedException \OCP\Lock\LockedException */ public function testChangeLockToExclusiveDoubleShared() { + $this->expectException(\OCP\Lock\LockedException::class); + $this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); $this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); $this->instance->changeLock('foo', ILockingProvider::LOCK_EXCLUSIVE); } /** - * @expectedException \OCP\Lock\LockedException */ public function testChangeLockToExclusiveNoShared() { + $this->expectException(\OCP\Lock\LockedException::class); + $this->instance->changeLock('foo', ILockingProvider::LOCK_EXCLUSIVE); } /** - * @expectedException \OCP\Lock\LockedException */ public function testChangeLockToExclusiveFromExclusive() { + $this->expectException(\OCP\Lock\LockedException::class); + $this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE); $this->instance->changeLock('foo', ILockingProvider::LOCK_EXCLUSIVE); } /** - * @expectedException \OCP\Lock\LockedException */ public function testChangeLockToSharedNoExclusive() { + $this->expectException(\OCP\Lock\LockedException::class); + $this->instance->changeLock('foo', ILockingProvider::LOCK_SHARED); } /** - * @expectedException \OCP\Lock\LockedException */ public function testChangeLockToSharedFromShared() { + $this->expectException(\OCP\Lock\LockedException::class); + $this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); $this->instance->changeLock('foo', ILockingProvider::LOCK_SHARED); } /** - * @expectedException \InvalidArgumentException */ public function testTooLongLockName() { + $this->expectException(\InvalidArgumentException::class); + $this->instance->acquireLock(\str_repeat("x", 250), ILockingProvider::LOCK_EXCLUSIVE); } } diff --git a/tests/lib/Lock/Persistent/LockManagerTest.php b/tests/lib/Lock/Persistent/LockManagerTest.php index 886f79a230ff..ea4fa253e1ea 100644 --- a/tests/lib/Lock/Persistent/LockManagerTest.php +++ b/tests/lib/Lock/Persistent/LockManagerTest.php @@ -66,18 +66,20 @@ public function setUp(): void { } /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage No token provided in $lockInfo */ public function testLockNoToken() { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('No token provided in $lockInfo'); + $this->manager->lock(6, '/foo/bar', 123, []); } /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Invalid file id */ public function testLockInvalidFileId() { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid file id'); + $this->manager->lock(6, '/foo/bar', -1, []); } diff --git a/tests/lib/Lock/Persistent/LockMapperTest.php b/tests/lib/Lock/Persistent/LockMapperTest.php index c33939e11c13..7b4a09461a29 100644 --- a/tests/lib/Lock/Persistent/LockMapperTest.php +++ b/tests/lib/Lock/Persistent/LockMapperTest.php @@ -371,9 +371,10 @@ private function createLockAnInsert($createdAt = 0) { } /** - * @expectedException \OCP\AppFramework\Db\DoesNotExistException */ public function testDeleteUserDeletesLock() { + $this->expectException(\OCP\AppFramework\Db\DoesNotExistException::class); + if ($this->db->getDatabasePlatform() instanceof SqlitePlatform) { // remove when https://github.com/doctrine/dbal/issues/1204 and https://github.com/doctrine/dbal/issues/2833 are fixed $this->markTestSkipped("No cascade delete possible on Sqlite with Doctrine DBAL"); diff --git a/tests/lib/Mail/MailerTest.php b/tests/lib/Mail/MailerTest.php index 78bca0913db8..c6d730aa4301 100644 --- a/tests/lib/Mail/MailerTest.php +++ b/tests/lib/Mail/MailerTest.php @@ -77,9 +77,10 @@ public function testCreateMessage(): void { } /** - * @expectedException \Exception */ public function testSendInvalidMailException(): void { + $this->expectException(\Exception::class); + /** @var Message | \PHPUnit\Framework\MockObject\MockObject $message */ $message = $this->getMockBuilder(Message::class) ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/Memcache/FactoryTest.php b/tests/lib/Memcache/FactoryTest.php index 44260b1faf32..e85a02c08091 100644 --- a/tests/lib/Memcache/FactoryTest.php +++ b/tests/lib/Memcache/FactoryTest.php @@ -123,9 +123,10 @@ public function testCacheAvailability($localCache, $distributedCache, $lockingCa /** * @dataProvider cacheUnavailableProvider - * @expectedException \OC\HintException */ public function testCacheNotAvailableException($localCache, $distributedCache) { + $this->expectException(\OC\HintException::class); + $logger = $this->getMockBuilder('\OCP\ILogger')->getMock(); new \OC\Memcache\Factory('abc', $logger, $localCache, $distributedCache); } diff --git a/tests/lib/Notification/ActionTest.php b/tests/lib/Notification/ActionTest.php index 48bfadbf1a5c..8cf8b8150794 100644 --- a/tests/lib/Notification/ActionTest.php +++ b/tests/lib/Notification/ActionTest.php @@ -69,9 +69,10 @@ public function dataSetLabelInvalid() { * @dataProvider dataSetLabelInvalid * @param mixed $label * - * @expectedException \InvalidArgumentException */ public function testSetLabelInvalid($label) { + $this->expectException(\InvalidArgumentException::class); + $this->action->setLabel($label); } @@ -109,9 +110,10 @@ public function dataSetParsedLabelInvalid() { * @dataProvider dataSetParsedLabelInvalid * @param mixed $label * - * @expectedException \InvalidArgumentException */ public function testSetParsedLabelInvalid($label) { + $this->expectException(\InvalidArgumentException::class); + $this->action->setParsedLabel($label); } @@ -164,9 +166,10 @@ public function dataSetLinkInvalid() { * @param mixed $link * @param mixed $type * - * @expectedException \InvalidArgumentException */ public function testSetLinkInvalid($link, $type) { + $this->expectException(\InvalidArgumentException::class); + $this->action->setLink($link, $type); } @@ -202,9 +205,10 @@ public function dataSetPrimaryInvalid() { * @dataProvider dataSetPrimaryInvalid * @param mixed $primary * - * @expectedException \InvalidArgumentException */ public function testSetPrimaryInvalid($primary) { + $this->expectException(\InvalidArgumentException::class); + $this->action->setPrimary($primary); } diff --git a/tests/lib/Notification/ManagerTest.php b/tests/lib/Notification/ManagerTest.php index 9d17f70ca12c..d22216297730 100644 --- a/tests/lib/Notification/ManagerTest.php +++ b/tests/lib/Notification/ManagerTest.php @@ -88,9 +88,10 @@ public function testRegisterApp() { } /** - * @expectedException \InvalidArgumentException */ public function testRegisterAppInvalid() { + $this->expectException(\InvalidArgumentException::class); + $notifier = $this->getMockBuilder(INotifier::class) ->disableOriginalConstructor() ->getMock(); @@ -158,9 +159,10 @@ public function testRegisterNotifier() { } /** - * @expectedException \InvalidArgumentException */ public function testRegisterNotifierInvalid() { + $this->expectException(\InvalidArgumentException::class); + $app = $this->getMockBuilder(IApp::class) ->disableOriginalConstructor() ->getMock(); @@ -188,10 +190,11 @@ public function dataRegisterNotifierInfoInvalid() { /** * @dataProvider dataRegisterNotifierInfoInvalid - * @expectedException \InvalidArgumentException * @param mixed $data */ public function testRegisterNotifierInfoInvalid($data) { + $this->expectException(\InvalidArgumentException::class); + $app = $this->getMockBuilder(IApp::class) ->disableOriginalConstructor() ->getMock(); @@ -208,10 +211,11 @@ public function testRegisterNotifierInfoInvalid($data) { } /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The given notifier ID test1 is already in use */ public function testRegisterNotifierInfoDuplicate() { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('The given notifier ID test1 is already in use'); + $app = $this->getMockBuilder(IApp::class) ->disableOriginalConstructor() ->getMock(); @@ -305,9 +309,10 @@ function (RegisterNotifierEvent $event) use ($notifier, &$callbackCalledCount) { } /** - * @expectedException \OCP\Notification\Exceptions\NotifierIdInUseException */ public function testRegisterNotifierNewDuplicatedId() { + $this->expectException(\OCP\Notification\Exceptions\NotifierIdInUseException::class); + $notifier = $this->getMockBuilder(INotifier::class) ->disableOriginalConstructor() ->getMock(); @@ -446,9 +451,10 @@ public function testNotify() { } /** - * @expectedException \InvalidArgumentException */ public function testNotifyInvalid() { + $this->expectException(\InvalidArgumentException::class); + /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(INotification::class) ->disableOriginalConstructor() @@ -509,9 +515,10 @@ public function testPrepare() { } /** - * @expectedException \InvalidArgumentException */ public function testPrepareInvalid() { + $this->expectException(\InvalidArgumentException::class); + /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(INotification::class) ->disableOriginalConstructor() @@ -566,9 +573,10 @@ public function testPrepareNotifierThrows() { } /** - * @expectedException \InvalidArgumentException */ public function testPrepareNoNotifier() { + $this->expectException(\InvalidArgumentException::class); + /** @var \OCP\Notification\INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->getMockBuilder(INotification::class) ->disableOriginalConstructor() diff --git a/tests/lib/Notification/NotificationTest.php b/tests/lib/Notification/NotificationTest.php index e0d0017f3d2c..84fc30dfb6aa 100644 --- a/tests/lib/Notification/NotificationTest.php +++ b/tests/lib/Notification/NotificationTest.php @@ -96,9 +96,10 @@ public function dataSetAppInvalid() { * @dataProvider dataSetAppInvalid * @param mixed $app * - * @expectedException \InvalidArgumentException */ public function testSetAppInvalid($app) { + $this->expectException(\InvalidArgumentException::class); + $this->notification->setApp($app); } @@ -124,9 +125,10 @@ public function dataSetUserInvalid() { * @dataProvider dataSetUserInvalid * @param mixed $user * - * @expectedException \InvalidArgumentException */ public function testSetUserInvalid($user) { + $this->expectException(\InvalidArgumentException::class); + $this->notification->setUser($user); } @@ -166,10 +168,11 @@ public function dataSetDateTimeZero() { * @dataProvider dataSetDateTimeZero * @param \DateTime $dateTime * - * @expectedException \InvalidArgumentException * @expectedMessage 'The given date time is invalid' */ public function testSetDateTimeZero($dateTime) { + $this->expectException(\InvalidArgumentException::class); + $this->notification->setDateTime($dateTime); } @@ -202,10 +205,11 @@ public function dataSetObjectTypeInvalid() { * @dataProvider dataSetObjectTypeInvalid * @param mixed $type * - * @expectedException \InvalidArgumentException * @expectedMessage 'The given object type is invalid' */ public function testSetObjectTypeInvalid($type) { + $this->expectException(\InvalidArgumentException::class); + $this->notification->setObject($type, 1337); } @@ -224,10 +228,11 @@ public function dataSetObjectIdInvalid() { * @dataProvider dataSetObjectIdInvalid * @param mixed $id * - * @expectedException \InvalidArgumentException * @expectedMessage 'The given object id is invalid' */ public function testSetObjectIdInvalid($id) { + $this->expectException(\InvalidArgumentException::class); + $this->notification->setObject('object', $id); } @@ -260,9 +265,10 @@ public function dataSetSubjectInvalidSubject() { * @dataProvider dataSetSubjectInvalidSubject * @param mixed $subject * - * @expectedException \InvalidArgumentException */ public function testSetSubjectInvalidSubject($subject) { + $this->expectException(\InvalidArgumentException::class); + $this->notification->setSubject($subject, []); } @@ -288,9 +294,10 @@ public function dataSetParsedSubjectInvalid() { * @dataProvider dataSetParsedSubjectInvalid * @param mixed $subject * - * @expectedException \InvalidArgumentException */ public function testSetParsedSubjectInvalid($subject) { + $this->expectException(\InvalidArgumentException::class); + $this->notification->setParsedSubject($subject); } @@ -323,9 +330,10 @@ public function dataSetMessageInvalidMessage() { * @dataProvider dataSetMessageInvalidMessage * @param mixed $message * - * @expectedException \InvalidArgumentException */ public function testSetMessageInvalidMessage($message) { + $this->expectException(\InvalidArgumentException::class); + $this->notification->setMessage($message, []); } @@ -351,9 +359,10 @@ public function dataSetParsedMessageInvalid() { * @dataProvider dataSetParsedMessageInvalid * @param mixed $message * - * @expectedException \InvalidArgumentException */ public function testSetParsedMessageInvalid($message) { + $this->expectException(\InvalidArgumentException::class); + $this->notification->setParsedMessage($message); } @@ -379,9 +388,10 @@ public function dataSetLinkInvalid() { * @dataProvider dataSetLinkInvalid * @param mixed $link * - * @expectedException \InvalidArgumentException */ public function testSetLinkInvalid($link) { + $this->expectException(\InvalidArgumentException::class); + $this->notification->setLink($link); } @@ -408,9 +418,10 @@ public function testAddAction() { } /** - * @expectedException \InvalidArgumentException */ public function testAddActionInvalid() { + $this->expectException(\InvalidArgumentException::class); + /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->getMockBuilder('OCP\Notification\IAction') ->disableOriginalConstructor() @@ -460,9 +471,10 @@ public function testAddParsedAction() { } /** - * @expectedException \InvalidArgumentException */ public function testAddParsedActionInvalid() { + $this->expectException(\InvalidArgumentException::class); + /** @var \OCP\Notification\IAction|\PHPUnit\Framework\MockObject\MockObject $action */ $action = $this->getMockBuilder('OCP\Notification\IAction') ->disableOriginalConstructor() diff --git a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php index e5ce01c91329..e4569b5a7bfa 100644 --- a/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php +++ b/tests/lib/Security/CSRF/TokenStorage/SessionStorageTest.php @@ -52,10 +52,11 @@ public function getTokenDataProvider() { * @param string $token * @dataProvider getTokenDataProvider * - * @expectedException \Exception - * @expectedExceptionMessage Session does not contain a requesttoken */ public function testGetTokenWithEmptyToken($token) { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Session does not contain a requesttoken'); + $this->session ->expects($this->once()) ->method('get') diff --git a/tests/lib/Security/CertificateManagerTest.php b/tests/lib/Security/CertificateManagerTest.php index 59ffe72be033..ff331215a4db 100644 --- a/tests/lib/Security/CertificateManagerTest.php +++ b/tests/lib/Security/CertificateManagerTest.php @@ -69,10 +69,11 @@ public function testListCertificates() { } /** - * @expectedException \Exception - * @expectedExceptionMessage Certificate could not get parsed. */ public function testAddInvalidCertificate() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Certificate could not get parsed.'); + $this->certificateManager->addCertificate('InvalidCertificate', 'invalidCertificate'); } @@ -88,12 +89,13 @@ public function dangerousFileProvider() { } /** - * @expectedException \Exception - * @expectedExceptionMessage Filename is not valid * @dataProvider dangerousFileProvider * @param string $filename */ public function testAddDangerousFile($filename) { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Filename is not valid'); + $this->certificateManager->addCertificate(\file_get_contents(__DIR__ . '/../../data/certificates/expiredCertificate.crt'), $filename); } diff --git a/tests/lib/Security/CertificateTest.php b/tests/lib/Security/CertificateTest.php index 922d947fb526..2ab299baa955 100644 --- a/tests/lib/Security/CertificateTest.php +++ b/tests/lib/Security/CertificateTest.php @@ -44,19 +44,21 @@ protected function setUp(): void { } /** - * @expectedException \Exception - * @expectedExceptionMessage Certificate could not get parsed. */ public function testBogusData() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Certificate could not get parsed.'); + $certificate = new Certificate('foo', 'bar'); $certificate->getIssueDate(); } /** - * @expectedException \Exception - * @expectedExceptionMessage Certificate could not get parsed. */ public function testCertificateStartingWithFileReference() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Certificate could not get parsed.'); + new Certificate('file://'.__DIR__ . '/../../data/certificates/goodCertificate.crt', 'bar'); } diff --git a/tests/lib/Security/CryptoTest.php b/tests/lib/Security/CryptoTest.php index 98bce3b3f2ab..ae97b8d294d5 100644 --- a/tests/lib/Security/CryptoTest.php +++ b/tests/lib/Security/CryptoTest.php @@ -36,10 +36,11 @@ public function testDefaultEncrypt($stringToEncrypt) { } /** - * @expectedException \Exception - * @expectedExceptionMessage HMAC does not match. */ public function testWrongPassword() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('HMAC does not match.'); + $stringToEncrypt = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt.'; $ciphertext = $this->crypto->encrypt($stringToEncrypt); $this->crypto->decrypt($ciphertext, 'A wrong password!'); @@ -52,19 +53,21 @@ public function testLaterDecryption() { } /** - * @expectedException \Exception - * @expectedExceptionMessage HMAC does not match. */ public function testWrongIV() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('HMAC does not match.'); + $encryptedString = '560f5436ba864b9f12f7f7ca6d41c327554a6f2c0a160a03316b202af07c65163274993f3a46e7547c07ba89304f00594a2f3bd99f83859097c58049c39d0d4ade10e0de914ff0604961e7c849d0271ed6c0b23f984ba16e7d033e3305fb0910e7b6a2a65c988d17dbee71d8f953684d|d2kdFUspVjC0o0sr|1a5feacf87eaa6869a6abdfba9a296e7bbad45b6ad89f7dce67cdc98e2da5dc4379cc672cc655e52bbf19599bf59482fbea13a73937697fa656bf10f3fc4f1aa'; $this->crypto->decrypt($encryptedString, 'ThisIsAVeryS3cur3P4ssw0rd'); } /** - * @expectedException \Exception - * @expectedExceptionMessage Authenticated ciphertext could not be decoded. */ public function testWrongParameters() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Authenticated ciphertext could not be decoded.'); + $encryptedString = '1|2'; $this->crypto->decrypt($encryptedString, 'ThisIsAVeryS3cur3P4ssw0rd'); } diff --git a/tests/lib/Session/MemoryTest.php b/tests/lib/Session/MemoryTest.php index 6f0418d1c5f9..1c837e20f258 100644 --- a/tests/lib/Session/MemoryTest.php +++ b/tests/lib/Session/MemoryTest.php @@ -16,9 +16,10 @@ protected function setUp(): void { } /** - * @expectedException \OCP\Session\Exceptions\SessionNotAvailableException */ public function testThrowsExceptionOnGetId() { + $this->expectException(\OCP\Session\Exceptions\SessionNotAvailableException::class); + $this->instance->getId(); } } diff --git a/tests/lib/SetupTest.php b/tests/lib/SetupTest.php index 3fadca623cc9..3b1696335cc7 100644 --- a/tests/lib/SetupTest.php +++ b/tests/lib/SetupTest.php @@ -123,10 +123,11 @@ public function testGetSupportedDatabasesWithAllWorking() { } /** - * @expectedException \Exception - * @expectedExceptionMessage Supported databases are not properly configured. */ public function testGetSupportedDatabaseException() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Supported databases are not properly configured.'); + $this->config ->expects($this->once()) ->method('getSystemValue') @@ -135,10 +136,11 @@ public function testGetSupportedDatabaseException() { } /** - * @expectedException \Exception - * @expectedExceptionMessage Can't update */ public function testCannotUpdateHtaccess() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Can\'t update'); + if ($this->getCurrentUser() === 'root') { $this->markTestSkipped( 'You are running tests as root - this test will not work in this case.' @@ -160,10 +162,11 @@ public function testCannotUpdateHtaccess() { } /** - * @expectedException \Exception - * @expectedExceptionMessage Can't update */ public function testHtaccessIsFolder() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Can\'t update'); + $origServerRoot = \OC::$SERVERROOT; $htaccessFile = \OC::$SERVERROOT . '/tests/data/.htaccess'; @\unlink($htaccessFile); diff --git a/tests/lib/Share/HelperTest.php b/tests/lib/Share/HelperTest.php index 152203454f55..1130475b68bc 100644 --- a/tests/lib/Share/HelperTest.php +++ b/tests/lib/Share/HelperTest.php @@ -121,9 +121,10 @@ public function dataTestSplitUserRemoteError() { * @dataProvider dataTestSplitUserRemoteError * * @param string $id - * @expectedException \OC\HintException */ public function testSplitUserRemoteError($id) { + $this->expectException(\OC\HintException::class); + \OC\Share\Helper::splitUserRemote($id); } diff --git a/tests/lib/Share/MailNotificationsTest.php b/tests/lib/Share/MailNotificationsTest.php index d7aee14f42f7..134181d0a1df 100644 --- a/tests/lib/Share/MailNotificationsTest.php +++ b/tests/lib/Share/MailNotificationsTest.php @@ -620,9 +620,10 @@ public function testSendInternalShareWithRecipientLanguageCode($recipientLanguag } /** - * @expectedException \OCP\Share\Exceptions\GenericShareException */ public function testSendLinkShareMailIfObeysConfig() { + $this->expectException(\OCP\Share\Exceptions\GenericShareException::class); + $this->config ->method('getAppValue') ->with('core', 'shareapi_allow_public_notification', 'no') @@ -635,9 +636,10 @@ public function testSendLinkShareMailIfObeysConfig() { } /** - * @expectedException \OCP\Share\Exceptions\GenericShareException */ public function testSendInternalShareMailIfObeysConfig() { + $this->expectException(\OCP\Share\Exceptions\GenericShareException::class); + $this->config ->method('getAppValue') ->with('core', 'shareapi_allow_mail_notification', 'no') diff --git a/tests/lib/Share/ShareTest.php b/tests/lib/Share/ShareTest.php index 50d1e282e09b..5b98d9f7bf23 100644 --- a/tests/lib/Share/ShareTest.php +++ b/tests/lib/Share/ShareTest.php @@ -835,9 +835,10 @@ public function dataShareWithRemoteUserAndRemoteIsInvalid() { * @dataProvider dataShareWithRemoteUserAndRemoteIsInvalid * * @param string $remoteId - * @expectedException \OC\HintException */ public function testShareWithRemoteUserAndRemoteIsInvalid($remoteId) { + $this->expectException(\OC\HintException::class); + \OC_User::setUserId($this->user1); \OCP\Share::shareItem('test', 'test.txt', \OCP\Share::SHARE_TYPE_REMOTE, $remoteId, \OCP\Constants::PERMISSION_ALL); } @@ -1146,10 +1147,11 @@ public function testClearExpireDateWhileEnforced() { /** * Cannot set password is there is no user * - * @expectedException \Exception - * @expectedExceptionMessage User not logged in */ public function testSetPasswordNoUser() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('User not logged in'); + $userSession = $this->getMockBuilder('\OCP\IUserSession') ->disableOriginalConstructor() ->getMock(); @@ -1269,12 +1271,11 @@ function (GenericEvent $receivedEvent) use (&$event) { } /** - * @expectedException \Exception - * @expectedExceptionMessage Cannot remove password - * - * Test removing a password when password is enforced */ public function testSetPasswordRemove() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Cannot remove password * Test removing a password when password is enforced'); + $user = $this->getMockBuilder('\OCP\IUser') ->disableOriginalConstructor() ->getMock(); @@ -1320,12 +1321,11 @@ public function testSetPasswordRemove() { } /** - * @expectedException \Exception - * @expectedExceptionMessage Share not found - * - * Test modification of invaid share */ public function testSetPasswordInvalidShare() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Share not found * Test modification of invaid share'); + $user = $this->getMockBuilder('\OCP\IUser') ->disableOriginalConstructor() ->getMock(); @@ -1370,12 +1370,11 @@ public function testSetPasswordInvalidShare() { } /** - * @expectedException \Exception - * @expectedExceptionMessage Cannot update share of a different user - * - * Test modification of share of another user */ public function testSetPasswordShareOtherUser() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Cannot update share of a different user * Test modification of share of another user'); + $user = $this->getMockBuilder('\OCP\IUser') ->disableOriginalConstructor() ->getMock(); diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php index 38fcfbb4e62c..770dfd983249 100644 --- a/tests/lib/Share20/DefaultShareProviderTest.php +++ b/tests/lib/Share20/DefaultShareProviderTest.php @@ -150,9 +150,10 @@ private function addShareToDB($shareType, $sharedWith, $sharedBy, $shareOwner, } /** - * @expectedException \OCP\Share\Exceptions\ShareNotFound */ public function testGetShareByIdNotExist() { + $this->expectException(\OCP\Share\Exceptions\ShareNotFound::class); + $this->provider->getShareById(1); } @@ -879,9 +880,10 @@ public function testGetShareByToken() { } /** - * @expectedException \OCP\Share\Exceptions\ShareNotFound */ public function testGetShareByTokenNotFound() { + $this->expectException(\OCP\Share\Exceptions\ShareNotFound::class); + $this->provider->getShareByToken('invalidtoken'); } @@ -2014,10 +2016,11 @@ public function testDeleteFromSelfGroupAlreadyCustomShare() { } /** - * @expectedException \OC\Share20\Exception\ProviderException - * @expectedExceptionMessage Recipient not in receiving group */ public function testDeleteFromSelfGroupUserNotInGroup() { + $this->expectException(\OC\Share20\Exception\ProviderException::class); + $this->expectExceptionMessage('Recipient not in receiving group'); + $qb = $this->dbConn->getQueryBuilder(); $stmt = $qb->insert('share') ->values([ @@ -2059,10 +2062,11 @@ public function testDeleteFromSelfGroupUserNotInGroup() { } /** - * @expectedException \OC\Share20\Exception\ProviderException - * @expectedExceptionMessage Group "group" does not exist */ public function testDeleteFromSelfGroupDoesNotExist() { + $this->expectException(\OC\Share20\Exception\ProviderException::class); + $this->expectExceptionMessage('Group "group" does not exist'); + $qb = $this->dbConn->getQueryBuilder(); $stmt = $qb->insert('share') ->values([ @@ -2150,10 +2154,11 @@ public function testDeleteFromSelfUser() { } /** - * @expectedException \OC\Share20\Exception\ProviderException - * @expectedExceptionMessage Recipient does not match */ public function testDeleteFromSelfUserNotRecipient() { + $this->expectException(\OC\Share20\Exception\ProviderException::class); + $this->expectExceptionMessage('Recipient does not match'); + $qb = $this->dbConn->getQueryBuilder(); $stmt = $qb->insert('share') ->values([ @@ -2191,10 +2196,11 @@ public function testDeleteFromSelfUserNotRecipient() { } /** - * @expectedException \OC\Share20\Exception\ProviderException - * @expectedExceptionMessage Invalid share type 3 */ public function testDeleteFromSelfLink() { + $this->expectException(\OC\Share20\Exception\ProviderException::class); + $this->expectExceptionMessage('Invalid share type 3'); + $qb = $this->dbConn->getQueryBuilder(); $stmt = $qb->insert('share') ->values([ @@ -2228,10 +2234,11 @@ public function testDeleteFromSelfLink() { } /** - * @expectedException \OC\Share20\Exception\ProviderException - * @expectedExceptionMessage Can't update share of recipient for share type 3 */ public function testUpdateForRecipientWrongType() { + $this->expectException(\OC\Share20\Exception\ProviderException::class); + $this->expectExceptionMessage('Can\'t update share of recipient for share type 3'); + $share = $this->createMock(IShare::class); $share->method('getShareType')->willReturn(\OCP\Share::SHARE_TYPE_LINK); diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php index d365a6bb4121..e9cd29c310e2 100644 --- a/tests/lib/Share20/ManagerTest.php +++ b/tests/lib/Share20/ManagerTest.php @@ -164,9 +164,10 @@ private function createManagerMock() { } /** - * @expectedException \InvalidArgumentException */ public function testDeleteNoShareId() { + $this->expectException(\InvalidArgumentException::class); + $share = $this->manager->newShare(); $this->manager->deleteShare($share); @@ -581,9 +582,10 @@ public function testGetShareById() { } /** - * @expectedException \OCP\Share\Exceptions\ShareNotFound */ public function testGetExpiredShareById() { + $this->expectException(\OCP\Share\Exceptions\ShareNotFound::class); + $manager = $this->createManagerMock() ->setMethods(['deleteShare']) ->getMock(); @@ -718,10 +720,11 @@ public function testVerifyPasswordHook() { } /** - * @expectedException Exception - * @expectedExceptionMessage password not accepted */ public function testVerifyPasswordHookFails() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('password not accepted'); + $this->config->method('getAppValue')->will($this->returnValueMap([ ['core', 'shareapi_enforce_links_password', 'no', 'no'], ['core', 'shareapi_disable_enforce_links_password_for_upload_only', 'no', 'no'], @@ -881,10 +884,10 @@ public function testGeneralChecks($share, $exceptionMessage, $exception) { } /** - * @expectedException \OCP\Share\Exceptions\GenericShareException - * @expectedExceptionMessage Expiration date is in the past */ public function testvalidateExpirationDateInPast() { + $this->expectException(\OCP\Share\Exceptions\GenericShareException::class); + $this->expectExceptionMessage('Expiration date is in the past'); // Expire date in the past $past = new \DateTime(); @@ -897,10 +900,11 @@ public function testvalidateExpirationDateInPast() { } /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Expiration date is enforced */ public function testvalidateExpirationDateEnforceButNotSet() { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Expiration date is enforced'); + $share = $this->manager->newShare(); $share->setProviderId('foo')->setId('bar'); @@ -1086,10 +1090,11 @@ public function testValidateExpirationDateHookModification() { } /** - * @expectedException \Exception - * @expectedExceptionMessage Invalid date! */ public function testValidateExpirationDateHookException() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Invalid date!'); + $nextWeek = new \DateTime(); $nextWeek->add(new \DateInterval('P7D')); $nextWeek->setTime(0, 0, 0); @@ -1124,10 +1129,11 @@ public function testValidateExpirationDateExistingShareNoDefault() { } /** - * @expectedException Exception - * @expectedExceptionMessage Only sharing with group members is allowed */ public function testUserCreateChecksShareWithGroupMembersOnlyDifferentGroups() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Only sharing with group members is allowed'); + $share = $this->manager->newShare(); $sharedBy = $this->createMock('\OCP\IUser'); @@ -1198,10 +1204,11 @@ public function testUserCreateChecksShareWithGroupMembersOnlySharedGroup() { } /** - * @expectedException Exception - * @expectedExceptionMessage Path already shared with this user */ public function testUserCreateChecksIdenticalShareExists() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Path already shared with this user'); + $share = $this->manager->newShare(); $share2 = $this->manager->newShare(); @@ -1224,10 +1231,11 @@ public function testUserCreateChecksIdenticalShareExists() { } /** - * @expectedException Exception - * @expectedExceptionMessage Path already shared with this user */ public function testUserCreateChecksIdenticalPathSharedViaGroup() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Path already shared with this user'); + $share = $this->manager->newShare(); $sharedWith = $this->createMock('\OCP\IUser'); @@ -1336,10 +1344,11 @@ public function testUserCreateChecksIdenticalPathNotSharedWithUser() { } /** - * @expectedException Exception - * @expectedExceptionMessage Group sharing is not allowed */ public function testGroupCreateChecksShareWithGroupMembersGroupSharingNotAllowed() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Group sharing is not allowed'); + $share = $this->manager->newShare(); $this->config @@ -1352,10 +1361,11 @@ public function testGroupCreateChecksShareWithGroupMembersGroupSharingNotAllowed } /** - * @expectedException Exception - * @expectedExceptionMessage Only sharing within your own groups is allowed */ public function testGroupCreateChecksShareWithGroupMembersOnlyNotInGroup() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Only sharing within your own groups is allowed'); + $share = $this->manager->newShare(); $user = $this->createMock('\OCP\IUser'); @@ -1378,10 +1388,11 @@ public function testGroupCreateChecksShareWithGroupMembersOnlyNotInGroup() { } /** - * @expectedException Exception - * @expectedExceptionMessage Only sharing within your own groups is allowed */ public function testGroupCreateChecksShareWithGroupMembersOnlyNullGroup() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Only sharing within your own groups is allowed'); + $share = $this->manager->newShare(); $user = $this->createMock('\OCP\IUser'); @@ -1432,10 +1443,11 @@ public function testGroupCreateChecksShareWithGroupMembersOnlyInGroup() { } /** - * @expectedException Exception - * @expectedExceptionMessage Path already shared with this group */ public function testGroupCreateChecksPathAlreadySharedWithSameGroup() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Path already shared with this group'); + $share = $this->manager->newShare(); $path = $this->createMock('\OCP\Files\Node'); @@ -1491,10 +1503,11 @@ public function testGroupCreateChecksPathAlreadySharedWithDifferentGroup() { } /** - * @expectedException Exception - * @expectedExceptionMessage Link sharing not allowed */ public function testLinkCreateChecksNoLinkSharesAllowed() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Link sharing not allowed'); + $share = $this->manager->newShare(); $this->config @@ -1507,10 +1520,11 @@ public function testLinkCreateChecksNoLinkSharesAllowed() { } /** - * @expectedException Exception - * @expectedExceptionMessage Link shares can't have reshare permissions */ public function testLinkCreateChecksSharePermissions() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Link shares can\'t have reshare permissions'); + $share = $this->manager->newShare(); $share->setPermissions(\OCP\Constants::PERMISSION_SHARE); @@ -1525,10 +1539,11 @@ public function testLinkCreateChecksSharePermissions() { } /** - * @expectedException Exception - * @expectedExceptionMessage Public upload not allowed */ public function testLinkCreateChecksNoPublicUpload() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Public upload not allowed'); + $share = $this->manager->newShare(); $share->setPermissions(\OCP\Constants::PERMISSION_CREATE | \OCP\Constants::PERMISSION_UPDATE); @@ -1578,10 +1593,11 @@ public function testLinkCreateChecksReadOnly() { } /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Path contains files shared with you */ public function testPathCreateChecksContainsSharedMount() { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Path contains files shared with you'); + $path = $this->createMock('\OCP\Files\Folder'); $path->method('getPath')->willReturn('path'); @@ -2016,10 +2032,11 @@ public function testTransferShare($sharetype) { } /** - * @expectedException \OCP\Share\Exceptions\TransferSharesException - * @expectedExceptionMessage The current owner of the share user1 doesn't exist */ public function testTransferShareNoOldOwner() { + $this->expectException(\OCP\Share\Exceptions\TransferSharesException::class); + $this->expectExceptionMessage('The current owner of the share user1 doesn\'t exist'); + $manager = $this->createManagerMock() ->setMethods(['canShare', 'generalChecks', 'userCreateChecks', 'pathCreateChecks', 'deleteChildren', 'groupCreateChecks']) @@ -2035,10 +2052,11 @@ public function testTransferShareNoOldOwner() { } /** - * @expectedException \OCP\Share\Exceptions\TransferSharesException - * @expectedExceptionMessage The future owner user2, where the share has to be moved doesn't exist */ public function testTransferShareNoNewOwner() { + $this->expectException(\OCP\Share\Exceptions\TransferSharesException::class); + $this->expectExceptionMessage('The future owner user2, where the share has to be moved doesn\'t exist'); + $manager = $this->createManagerMock() ->setMethods(['canShare', 'generalChecks', 'userCreateChecks', 'pathCreateChecks', 'deleteChildren', 'groupCreateChecks']) @@ -2055,10 +2073,11 @@ public function testTransferShareNoNewOwner() { } /** - * @expectedException \OCP\Share\Exceptions\TransferSharesException - * @expectedExceptionMessage The current owner of the share and the future owner of the share are same */ public function testTransferShareNoSameOwner() { + $this->expectException(\OCP\Share\Exceptions\TransferSharesException::class); + $this->expectExceptionMessage('The current owner of the share and the future owner of the share are same'); + $manager = $this->createManagerMock() ->setMethods(['canShare', 'generalChecks', 'userCreateChecks', 'pathCreateChecks', 'deleteChildren', 'groupCreateChecks']) @@ -2074,10 +2093,11 @@ public function testTransferShareNoSameOwner() { } /** - * @expectedException \OCP\Files\NotFoundException - * @expectedExceptionMessage The target location user1/files/transferred doesn't exist */ public function testTransferShareNonExistingFinalTarget() { + $this->expectException(\OCP\Files\NotFoundException::class); + $this->expectExceptionMessage('The target location user1/files/transferred doesn\'t exist'); + $manager = $this->createManagerMock() ->setMethods(['canShare', 'generalChecks', 'userCreateChecks', 'pathCreateChecks', 'deleteChildren', 'groupCreateChecks']) @@ -2423,10 +2443,11 @@ function (GenericEvent $event) use (&$calledAfterShareCreate) { } /** - * @expectedException Exception - * @expectedExceptionMessage I won't let you share */ public function testCreateShareHookError() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('I won\'t let you share'); + $manager = $this->createManagerMock() ->setMethods([ 'canShare', @@ -2677,9 +2698,10 @@ public function testGetAllSharesByExpiration() { } /** - * @expectedException \InvalidArgumentException */ public function testGetAllSharesByException() { + $this->expectException(\InvalidArgumentException::class); + $shares = $this->manager->getAllSharesBy('user', [\OCP\Share::SHARE_TYPE_USER], [], true); } @@ -2865,9 +2887,10 @@ public function testGetShareByTokenWithException() { } /** - * @expectedException \OCP\Share\Exceptions\ShareNotFound */ public function testGetShareByTokenExpired() { + $this->expectException(\OCP\Share\Exceptions\ShareNotFound::class); + $manager = $this->createManagerMock() ->setMethods(['deleteShare']) ->getMock(); @@ -3040,10 +3063,11 @@ public function testCheckPasswordUpdateShare() { } /** - * @expectedException Exception - * @expectedExceptionMessage Can't change share type */ public function testUpdateShareCantChangeShareType() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Can\'t change share type'); + $manager = $this->createManagerMock() ->setMethods([ 'canShare', @@ -3066,10 +3090,11 @@ public function testUpdateShareCantChangeShareType() { } /** - * @expectedException Exception - * @expectedExceptionMessage Can only update recipient on user shares */ public function testUpdateShareCantChangeRecipientForGroupShare() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Can only update recipient on user shares'); + $manager = $this->createManagerMock() ->setMethods([ 'canShare', @@ -3094,10 +3119,11 @@ public function testUpdateShareCantChangeRecipientForGroupShare() { } /** - * @expectedException Exception - * @expectedExceptionMessage Can't share with the share owner */ public function testUpdateShareCantShareWithOwner() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('Can\'t share with the share owner'); + $manager = $this->createManagerMock() ->setMethods([ 'canShare', diff --git a/tests/lib/Share20/ShareTest.php b/tests/lib/Share20/ShareTest.php index ef9140043a66..c1524aefc7a5 100644 --- a/tests/lib/Share20/ShareTest.php +++ b/tests/lib/Share20/ShareTest.php @@ -41,10 +41,11 @@ public function setUp(): void { } /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage String expected. */ public function testSetIdInvalid() { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('String expected.'); + $this->share->setId(1.2); } @@ -59,19 +60,21 @@ public function testSetIdString() { } /** - * @expectedException \OCP\Share\Exceptions\IllegalIDChangeException - * @expectedExceptionMessage Not allowed to assign a new internal id to a share */ public function testSetIdOnce() { + $this->expectException(\OCP\Share\Exceptions\IllegalIDChangeException::class); + $this->expectExceptionMessage('Not allowed to assign a new internal id to a share'); + $this->share->setId('foo'); $this->share->setId('bar'); } /** - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage String expected. */ public function testSetProviderIdInt() { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('String expected.'); + $this->share->setProviderId(42); } @@ -82,10 +85,11 @@ public function testSetProviderIdString() { } /** - * @expectedException \OCP\Share\Exceptions\IllegalIDChangeException - * @expectedExceptionMessage Not allowed to assign a new provider id to a share */ public function testSetProviderIdOnce() { + $this->expectException(\OCP\Share\Exceptions\IllegalIDChangeException::class); + $this->expectExceptionMessage('Not allowed to assign a new provider id to a share'); + $this->share->setProviderId('foo'); $this->share->setProviderId('bar'); } diff --git a/tests/lib/SystemTag/SystemTagManagerTest.php b/tests/lib/SystemTag/SystemTagManagerTest.php index 241b4b5d228c..a042c49f7875 100644 --- a/tests/lib/SystemTag/SystemTagManagerTest.php +++ b/tests/lib/SystemTag/SystemTagManagerTest.php @@ -248,9 +248,10 @@ public function oneTagMultipleFlagsProvider() { /** * @dataProvider oneTagMultipleFlagsProvider - * @expectedException \OCP\SystemTag\TagAlreadyExistsException */ public function testCreateDuplicate($name, $userVisible, $userAssignable) { + $this->expectException(\OCP\SystemTag\TagAlreadyExistsException::class); + try { $this->tagManager->createTag($name, $userVisible, $userAssignable); } catch (\Exception $e) { @@ -285,24 +286,27 @@ public function testGetExistingTagById() { } /** - * @expectedException \OCP\SystemTag\TagNotFoundException */ public function testGetNonExistingTag() { + $this->expectException(\OCP\SystemTag\TagNotFoundException::class); + $this->tagManager->getTag('nonexist', false, false); } /** - * @expectedException \OCP\SystemTag\TagNotFoundException */ public function testGetNonExistingTagsById() { + $this->expectException(\OCP\SystemTag\TagNotFoundException::class); + $tag1 = $this->tagManager->createTag('one', true, false); $this->tagManager->getTagsByIds([$tag1->getId(), 100, 101]); } /** - * @expectedException \InvalidArgumentException */ public function testGetInvalidTagIdFormat() { + $this->expectException(\InvalidArgumentException::class); + $tag1 = $this->tagManager->createTag('one', true, false); $this->tagManager->getTagsByIds([$tag1->getId() . 'suffix']); } @@ -365,9 +369,10 @@ public function testUpdateTag($tagCreate, $tagUpdated) { /** * @dataProvider updateTagProvider - * @expectedException \OCP\SystemTag\TagAlreadyExistsException */ public function testUpdateTagDuplicate($tagCreate, $tagUpdated) { + $this->expectException(\OCP\SystemTag\TagAlreadyExistsException::class); + $this->tagManager->createTag( $tagCreate[0], $tagCreate[1], @@ -404,9 +409,10 @@ public function testDeleteTags() { } /** - * @expectedException \OCP\SystemTag\TagNotFoundException */ public function testDeleteNonExistingTag() { + $this->expectException(\OCP\SystemTag\TagNotFoundException::class); + $this->tagManager->deleteTags([100]); } diff --git a/tests/lib/SystemTag/SystemTagObjectMapperTest.php b/tests/lib/SystemTag/SystemTagObjectMapperTest.php index b4d698360ff1..6c5ed5fc6d26 100644 --- a/tests/lib/SystemTag/SystemTagObjectMapperTest.php +++ b/tests/lib/SystemTag/SystemTagObjectMapperTest.php @@ -189,9 +189,10 @@ public function testGetObjectsForTagsLimit() { } /** - * @expectedException \InvalidArgumentException */ public function testGetObjectsForTagsLimitWithMultipleTags() { + $this->expectException(\InvalidArgumentException::class); + $this->tagMapper->getObjectIdsForTags( [$this->tag1->getId(), $this->tag2->getId(), $this->tag3->getId()], 'testtype', @@ -213,9 +214,10 @@ public function testGetObjectsForTagsLimitOffset() { } /** - * @expectedException \OCP\SystemTag\TagNotFoundException */ public function testGetObjectsForNonExistingTag() { + $this->expectException(\OCP\SystemTag\TagNotFoundException::class); + $this->tagMapper->getObjectIdsForTags( [100], 'testtype' @@ -251,9 +253,10 @@ public function testReAssignUnassignTags() { } /** - * @expectedException \OCP\SystemTag\TagNotFoundException */ public function testAssignNonExistingTags() { + $this->expectException(\OCP\SystemTag\TagNotFoundException::class); + $this->tagMapper->assignTags('1', 'testtype', [100]); } @@ -278,9 +281,10 @@ public function testAssignNonExistingTagInArray() { } /** - * @expectedException \OCP\SystemTag\TagNotFoundException */ public function testUnassignNonExistingTags() { + $this->expectException(\OCP\SystemTag\TagNotFoundException::class); + $this->tagMapper->unassignTags('1', 'testtype', [100]); } @@ -409,9 +413,10 @@ public function testHaveTagAtLeastOneMatch() { } /** - * @expectedException \OCP\SystemTag\TagNotFoundException */ public function testHaveTagNonExisting() { + $this->expectException(\OCP\SystemTag\TagNotFoundException::class); + $this->tagMapper->haveTag( ['1'], 'testtype', diff --git a/tests/lib/User/BasicAuthModuleTest.php b/tests/lib/User/BasicAuthModuleTest.php index 3c63fc40a429..bd59501541c7 100644 --- a/tests/lib/User/BasicAuthModuleTest.php +++ b/tests/lib/User/BasicAuthModuleTest.php @@ -200,9 +200,10 @@ public function invalidUserIdProvider() { /** * @dataProvider invalidUserIdProvider - * @expectedException \UnexpectedValueException */ public function testInvalidUserId($userId) { + $this->expectException(\UnexpectedValueException::class); + $this->session->method('exists')->will($this->returnValueMap([ ['app_password', false], ['last_check_timeout', true] diff --git a/tests/lib/User/DatabaseTest.php b/tests/lib/User/DatabaseTest.php index deedc113b77a..a79213057d5e 100644 --- a/tests/lib/User/DatabaseTest.php +++ b/tests/lib/User/DatabaseTest.php @@ -59,10 +59,11 @@ protected function tearDown(): void { * * @param string $password * @dataProvider getEmptyValues - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Password cannot be empty */ public function testCannotSetEmptyPassword($password) { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Password cannot be empty'); + $user1 = $this->getUser(); $this->backend->createUser($this->getUser(), 'pw'); $this->backend->setPassword($user1, $password); diff --git a/tests/lib/User/SessionTest.php b/tests/lib/User/SessionTest.php index a008eebbc485..8e1dd9db5c2d 100644 --- a/tests/lib/User/SessionTest.php +++ b/tests/lib/User/SessionTest.php @@ -275,9 +275,10 @@ public function testLoginValidPasswordEnabled() { } /** - * @expectedException \OC\User\LoginException */ public function testLoginValidPasswordDisabled() { + $this->expectException(\OC\User\LoginException::class); + /** @var ISession | \PHPUnit\Framework\MockObject\MockObject $session */ $session = $this->createMock(Memory::class); $session->expects($this->never()) @@ -403,9 +404,10 @@ public function testLoginWithDifferentTokenLoginName() { } /** - * @expectedException \OC\Authentication\Exceptions\PasswordLoginForbiddenException */ public function testLogClientInNoTokenPasswordWith2fa() { + $this->expectException(\OC\Authentication\Exceptions\PasswordLoginForbiddenException::class); + $manager = $this->getMockBuilder(Manager::class) ->disableOriginalConstructor() ->getMock(); @@ -496,9 +498,10 @@ public function testLogClientInWithTokenPassword() { } /** - * @expectedException \OC\Authentication\Exceptions\PasswordLoginForbiddenException */ public function testLogClientInNoTokenPasswordNo2fa() { + $this->expectException(\OC\Authentication\Exceptions\PasswordLoginForbiddenException::class); + $manager = $this->getMockBuilder(Manager::class) ->disableOriginalConstructor() ->getMock(); @@ -839,9 +842,10 @@ public function testInvalidateSessionToken() { } /** - * @expectedException \OC\User\LoginException */ public function testTryTokenLoginWithDisabledUser() { + $this->expectException(\OC\User\LoginException::class); + $manager = $this->getMockBuilder(Manager::class) ->disableOriginalConstructor() ->getMock(); @@ -1577,10 +1581,11 @@ public function testLoginUser() { } /** - * @expectedException \OC\User\LoginException - * @expectedExceptionMessage User disabled */ public function testFailedLoginUserDisabled() { + $this->expectException(\OC\User\LoginException::class); + $this->expectExceptionMessage('User disabled'); + /** @var Manager | \PHPUnit\Framework\MockObject\MockObject $userManager */ $userManager = $this->createMock(Manager::class); $userManager->expects($this->any())->method('emit')->willReturn(null); diff --git a/tests/lib/User/SyncServiceTest.php b/tests/lib/User/SyncServiceTest.php index d81380209f6d..39763294b9dd 100644 --- a/tests/lib/User/SyncServiceTest.php +++ b/tests/lib/User/SyncServiceTest.php @@ -160,9 +160,10 @@ public function testSyncHomeLogsWhenBackendDiffersFromExisting() { } /** - * @expectedException \InvalidArgumentException */ public function testTrySyncExistingUserWithOtherBackend() { + $this->expectException(\InvalidArgumentException::class); + $uid = 'myTestUser'; $wrongBackend = new Database(); diff --git a/tests/lib/User/UserTest.php b/tests/lib/User/UserTest.php index bb81ce8ff16e..efdf09771d03 100644 --- a/tests/lib/User/UserTest.php +++ b/tests/lib/User/UserTest.php @@ -175,11 +175,12 @@ public function testSetPassword() { /** * @param string $password * @dataProvider getEmptyValues - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage Password cannot be empty * @throws \InvalidArgumentException */ public function testSetEmptyPasswordNotPermitted($password) { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Password cannot be empty'); + (new User( $this->createMock(Account::class), $this->accountMapper diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php index 773575fedb8d..e68db139b6d2 100644 --- a/tests/lib/UtilTest.php +++ b/tests/lib/UtilTest.php @@ -58,9 +58,10 @@ public function testFormatDateWithTZ() { } /** - * @expectedException \Exception */ public function testFormatDateWithInvalidTZ() { + $this->expectException(\Exception::class); + OC_Util::formatDate(1350129205, false, 'Mordor/Barad-dûr'); } @@ -369,10 +370,11 @@ public function testCheckDataDirectoryValidity() { } /** - * @expectedException \OC\HintException - * @expectedExceptionMessage The skeleton folder /not/existing/Directory is not accessible */ public function testCopySkeletonDirectoryDoesNotExist() { + $this->expectException(\OC\HintException::class); + $this->expectExceptionMessage('The skeleton folder /not/existing/Directory is not accessible'); + $config = \OC::$server->getConfig(); $config->setSystemValue('skeletondirectory', '/not/existing/Directory'); $userFolder = $this->createMock(Folder::class); @@ -382,10 +384,11 @@ public function testCopySkeletonDirectoryDoesNotExist() { } /** - * @expectedException \OCP\Files\NoReadAccessException - * @expectedExceptionMessage No read permission for folder */ public function testCopySkeletonDirectoryNoReadAccess() { + $this->expectException(\OCP\Files\NoReadAccessException::class); + $this->expectExceptionMessage('No read permission for folder'); + if ($this->getCurrentUser() === 'root') { // root can still read folders with protection mask 0 $this->markTestSkipped( @@ -404,10 +407,11 @@ public function testCopySkeletonDirectoryNoReadAccess() { } /** - * @expectedException \OCP\Files\NoReadAccessException - * @expectedExceptionMessage No read permission for file */ public function testCopySkeletonDirectoryNoReadAccessToFile() { + $this->expectException(\OCP\Files\NoReadAccessException::class); + $this->expectExceptionMessage('No read permission for file'); + if ($this->getCurrentUser() === 'root') { // root can still read files with protection mask 0 $this->markTestSkipped( diff --git a/tests/lib/legacy/AppTest.php b/tests/lib/legacy/AppTest.php index d1290bb53df5..e89e669f8eb6 100644 --- a/tests/lib/legacy/AppTest.php +++ b/tests/lib/legacy/AppTest.php @@ -207,9 +207,10 @@ public function testGetAppInfoEmpty() { } /** - * @expectedException \OCP\App\AppNotFoundException */ public function testGetAppInfoDeleted() { + $this->expectException(\OCP\App\AppNotFoundException::class); + $info = \OC_App::getAppInfo('appinfotestapp'); $this->assertEqualsAppInfo($info); From 1cdb43cf9c3aa77e14390a1c8cc527476d659698 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sun, 1 Dec 2019 14:56:14 +0545 Subject: [PATCH 08/15] Adjust phpunit assertInternalType --- .../unit/CardDAV/AddressBookImplTest.php | 2 +- apps/dav/tests/unit/Upload/FutureFileTest.php | 2 +- .../tests/Panels/AdminPanelTest.php | 2 +- .../tests/Panels/GeneralPersonalPanelTest.php | 2 +- apps/federation/tests/PanelTest.php | 2 +- apps/files/tests/ActivityTest.php | 4 +- .../files_external/tests/Panels/AdminTest.php | 2 +- .../tests/Panels/PersonalTest.php | 2 +- apps/files_sharing/tests/ApiTest.php | 14 ++-- apps/files_sharing/tests/CapabilitiesTest.php | 10 +-- .../files_sharing/tests/SharedStorageTest.php | 2 +- apps/files_sharing/tests/UpdaterTest.php | 8 +-- .../tests/Controller/AdminControllerTest.php | 2 +- tests/Settings/Panels/Admin/AppsTest.php | 2 +- .../Panels/Admin/BackgroundJobsTest.php | 2 +- .../Panels/Admin/CertificatesTest.php | 2 +- .../Settings/Panels/Admin/EncryptionTest.php | 2 +- .../Settings/Panels/Admin/FileSharingTest.php | 2 +- tests/Settings/Panels/Admin/LegacyTest.php | 2 +- tests/Settings/Panels/Admin/LegalTest.php | 2 +- tests/Settings/Panels/Admin/LoggingTest.php | 2 +- tests/Settings/Panels/Admin/MailTest.php | 2 +- .../Panels/Admin/SecurityWarningTest.php | 2 +- tests/Settings/Panels/Admin/TipsTest.php | 2 +- .../Settings/Panels/Personal/ClientsTest.php | 2 +- tests/Settings/Panels/Personal/LegacyTest.php | 2 +- .../Settings/Panels/Personal/ProfileTest.php | 2 +- tests/Settings/Panels/Personal/QuotaTest.php | 2 +- tests/Settings/Panels/Personal/TokensTest.php | 2 +- .../Settings/Panels/Personal/VersionTest.php | 2 +- tests/lib/Activity/ManagerTest.php | 10 +-- .../lib/Activity/NullSession/ManagerTest.php | 10 +-- tests/lib/App/DependencyAnalyzerTest.php | 12 ++-- tests/lib/Comments/ManagerTest.php | 6 +- .../lib/DB/QueryBuilder/QueryBuilderTest.php | 2 +- tests/lib/Files/Cache/ScannerTest.php | 12 ++-- tests/lib/Files/Cache/UpdaterLegacyTest.php | 72 +++++++++---------- tests/lib/Files/MetaFilesTest.php | 2 +- tests/lib/Files/Storage/DavTest.php | 2 +- .../Files/Storage/Wrapper/ChecksumTest.php | 2 +- .../lib/Files/Storage/Wrapper/DirMaskTest.php | 6 +- tests/lib/Files/ViewTest.php | 4 +- tests/lib/Group/ManagerTest.php | 2 +- tests/lib/OCS/PrivatedataTest.php | 2 +- tests/lib/Share/ShareTest.php | 20 ++---- tests/lib/User/SyncServiceTest.php | 2 +- tests/lib/UtilTest.php | 8 +-- 47 files changed, 126 insertions(+), 136 deletions(-) diff --git a/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php index 0072196dc495..5d80c576cab6 100644 --- a/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php +++ b/apps/dav/tests/unit/CardDAV/AddressBookImplTest.php @@ -120,7 +120,7 @@ public function testSearch() { )->willReturn('vCard'); $result = $addressBookImpl->search($pattern, $searchProperties, [], 10, 0); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(2, $result); } diff --git a/apps/dav/tests/unit/Upload/FutureFileTest.php b/apps/dav/tests/unit/Upload/FutureFileTest.php index 90cc4049c110..0a4afbe0d922 100644 --- a/apps/dav/tests/unit/Upload/FutureFileTest.php +++ b/apps/dav/tests/unit/Upload/FutureFileTest.php @@ -51,7 +51,7 @@ public function testGetSize() { public function testGet() { $f = $this->mockFutureFile(); $stream = $f->get(); - $this->assertInternalType('resource', $stream); + $this->assertIsResource($stream); } public function testDelete() { diff --git a/apps/federatedfilesharing/tests/Panels/AdminPanelTest.php b/apps/federatedfilesharing/tests/Panels/AdminPanelTest.php index ffdff2aec740..b073181cbc04 100644 --- a/apps/federatedfilesharing/tests/Panels/AdminPanelTest.php +++ b/apps/federatedfilesharing/tests/Panels/AdminPanelTest.php @@ -51,7 +51,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); } public function testGetPanel() { diff --git a/apps/federatedfilesharing/tests/Panels/GeneralPersonalPanelTest.php b/apps/federatedfilesharing/tests/Panels/GeneralPersonalPanelTest.php index 950cbb47f636..bf6319c685c3 100644 --- a/apps/federatedfilesharing/tests/Panels/GeneralPersonalPanelTest.php +++ b/apps/federatedfilesharing/tests/Panels/GeneralPersonalPanelTest.php @@ -68,7 +68,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertTrue($this->panel->getPriority() < 50); } diff --git a/apps/federation/tests/PanelTest.php b/apps/federation/tests/PanelTest.php index 6b5f53246576..2a5b27db1dc8 100644 --- a/apps/federation/tests/PanelTest.php +++ b/apps/federation/tests/PanelTest.php @@ -85,7 +85,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertTrue($this->panel->getPriority() > -100); $this->assertTrue($this->panel->getPriority() < 100); } diff --git a/apps/files/tests/ActivityTest.php b/apps/files/tests/ActivityTest.php index d083f07eb7f3..a68b8fca4a66 100644 --- a/apps/files/tests/ActivityTest.php +++ b/apps/files/tests/ActivityTest.php @@ -113,7 +113,7 @@ protected function setUp(): void { public function testNotificationTypes() { $result = $this->activityExtension->getNotificationTypes('en'); - $this->assertInternalType('array', $result, 'Asserting getNotificationTypes() returns an array'); + $this->assertIsArray($result, 'Asserting getNotificationTypes() returns an array'); $this->assertCount(5, $result); $this->assertArrayHasKey(Activity::TYPE_SHARE_CREATED, $result); $this->assertArrayHasKey(Activity::TYPE_SHARE_CHANGED, $result); @@ -124,7 +124,7 @@ public function testNotificationTypes() { public function testDefaultTypes() { $result = $this->activityExtension->getDefaultTypes('stream'); - $this->assertInternalType('array', $result, 'Asserting getDefaultTypes(stream) returns an array'); + $this->assertIsArray($result, 'Asserting getDefaultTypes(stream) returns an array'); $this->assertCount(4, $result); $result = \array_flip($result); $this->assertArrayHasKey(Activity::TYPE_SHARE_CREATED, $result); diff --git a/apps/files_external/tests/Panels/AdminTest.php b/apps/files_external/tests/Panels/AdminTest.php index d15a99681dac..12c87a27d387 100644 --- a/apps/files_external/tests/Panels/AdminTest.php +++ b/apps/files_external/tests/Panels/AdminTest.php @@ -62,7 +62,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertTrue($this->panel->getPriority() > -100); $this->assertTrue($this->panel->getPriority() < 100); } diff --git a/apps/files_external/tests/Panels/PersonalTest.php b/apps/files_external/tests/Panels/PersonalTest.php index e50920030532..2414de1f328c 100644 --- a/apps/files_external/tests/Panels/PersonalTest.php +++ b/apps/files_external/tests/Panels/PersonalTest.php @@ -62,7 +62,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertTrue($this->panel->getPriority() > -100); $this->assertTrue($this->panel->getPriority() < 100); } diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index 28fa2630a5f5..b498cb3c2300 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -245,7 +245,7 @@ public function testCreateShareLink() { $data = $result->getData(); $this->assertEquals(1, $data['permissions']); $this->assertEmpty($data['expiration']); - $this->assertInternalType('string', $data['token']); + $this->assertIsString($data['token']); // check for correct link $url = \OC::$server->getURLGenerator()->getAbsoluteURL('/index.php/s/' . $data['token']); @@ -281,7 +281,7 @@ public function testCreateShareLinkPublicUpload() { $data['permissions'] ); $this->assertEmpty($data['expiration']); - $this->assertInternalType('string', $data['token']); + $this->assertIsString($data['token']); // check for correct link $url = \OC::$server->getURLGenerator()->getAbsoluteURL('/index.php/s/' . $data['token']); @@ -497,7 +497,7 @@ public function testPublicLinkUrl() { $data = $result->getData(); // check if we have a token - $this->assertInternalType('string', $data['token']); + $this->assertIsString($data['token']); $id = $data['id']; // check for correct link @@ -1415,7 +1415,7 @@ public function testDefaultExpireDate() { $this->assertInstanceOf(\OC\Files\FileInfo::class, $info); $result = Share::shareItem('file', $info->getId(), Share::SHARE_TYPE_LINK, null, Constants::PERMISSION_READ); - $this->assertInternalType('string', $result); + $this->assertIsString($result); $result = Share::shareItem('file', $info->getId(), Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, 31); $this->assertTrue($result); @@ -1435,7 +1435,7 @@ public function testDefaultExpireDate() { // now the link share should expire because of enforced default expire date // the user share should still exist $result = Share::getItemShared('file', $info->getId()); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(1, $result); $share = \reset($result); $this->assertSame(Share::SHARE_TYPE_USER, $share['share_type']); @@ -1482,7 +1482,7 @@ public function testPublicLinkExpireDate($date, $valid) { $this->assertTrue($result->succeeded()); $data = $result->getData(); - $this->assertInternalType('string', $data['token']); + $this->assertIsString($data['token']); $this->assertEquals($date, \substr($data['expiration'], 0, 10)); // check for correct link @@ -1516,7 +1516,7 @@ public function testCreatePublicLinkExpireDateValid() { $this->assertTrue($result->succeeded()); $data = $result->getData(); - $this->assertInternalType('string', $data['token']); + $this->assertIsString($data['token']); $this->assertEquals($date->format('Y-m-d') . ' 00:00:00', $data['expiration']); // check for correct link diff --git a/apps/files_sharing/tests/CapabilitiesTest.php b/apps/files_sharing/tests/CapabilitiesTest.php index b574982dca3f..0ddf6279b630 100644 --- a/apps/files_sharing/tests/CapabilitiesTest.php +++ b/apps/files_sharing/tests/CapabilitiesTest.php @@ -116,7 +116,7 @@ public function testNoLinkSharing() { ['core', 'shareapi_allow_links', 'yes', 'no'], ]; $result = $this->getResults($map); - $this->assertInternalType('array', $result['public']); + $this->assertIsArray($result['public']); $this->assertFalse($result['public']['enabled']); } @@ -149,7 +149,7 @@ public function testOnlyLinkSharing() { ['core', 'shareapi_allow_links', 'yes', 'yes'], ]; $result = $this->getResults($map); - $this->assertInternalType('array', $result['public']); + $this->assertIsArray($result['public']); $this->assertTrue($result['public']['enabled']); } @@ -218,7 +218,7 @@ public function testLinkNoExpireDate() { ]; $result = $this->getResults($map); $this->assertArrayHasKey('expire_date', $result['public']); - $this->assertInternalType('array', $result['public']['expire_date']); + $this->assertIsArray($result['public']['expire_date']); $this->assertFalse($result['public']['expire_date']['enabled']); } @@ -232,7 +232,7 @@ public function testLinkExpireDate() { ]; $result = $this->getResults($map); $this->assertArrayHasKey('expire_date', $result['public']); - $this->assertInternalType('array', $result['public']['expire_date']); + $this->assertIsArray($result['public']['expire_date']); $this->assertTrue($result['public']['expire_date']['enabled']); $this->assertArrayHasKey('days', $result['public']['expire_date']); $this->assertFalse($result['public']['expire_date']['enforced']); @@ -247,7 +247,7 @@ public function testLinkExpireDateEnforced() { ]; $result = $this->getResults($map); $this->assertArrayHasKey('expire_date', $result['public']); - $this->assertInternalType('array', $result['public']['expire_date']); + $this->assertIsArray($result['public']['expire_date']); $this->assertTrue($result['public']['expire_date']['enforced']); } diff --git a/apps/files_sharing/tests/SharedStorageTest.php b/apps/files_sharing/tests/SharedStorageTest.php index e39f4a45fc3f..754e0c5eeada 100644 --- a/apps/files_sharing/tests/SharedStorageTest.php +++ b/apps/files_sharing/tests/SharedStorageTest.php @@ -137,7 +137,7 @@ public function testRenamePartFile() { // create part file $result = $user2View->file_put_contents($this->folder . '/foo.txt.part', 'some test data'); - $this->assertInternalType('int', $result); + $this->assertIsInt($result); // rename part file to real file $result = $user2View->rename($this->folder . '/foo.txt.part', $this->folder . '/foo.txt'); diff --git a/apps/files_sharing/tests/UpdaterTest.php b/apps/files_sharing/tests/UpdaterTest.php index 955e3b316cdb..1091e17c21ba 100644 --- a/apps/files_sharing/tests/UpdaterTest.php +++ b/apps/files_sharing/tests/UpdaterTest.php @@ -178,10 +178,10 @@ public function testShareFile($shareFolder) { $afterShareDir = \OC\Files\Filesystem::getFileInfo($shareFolder); $etagAfterShareDir = $afterShareDir->getEtag(); - $this->assertInternalType('string', $etagBeforeShareRoot); - $this->assertInternalType('string', $etagBeforeShareDir); - $this->assertInternalType('string', $etagAfterShareRoot); - $this->assertInternalType('string', $etagAfterShareDir); + $this->assertIsString($etagBeforeShareRoot); + $this->assertIsString($etagBeforeShareDir); + $this->assertIsString($etagAfterShareRoot); + $this->assertIsString($etagAfterShareDir); $this->assertNotSame($etagBeforeShareRoot, $etagAfterShareRoot); $this->assertNotSame($etagBeforeShareDir, $etagAfterShareDir); diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php index 6b968f77453b..36d6d7de6a78 100644 --- a/apps/updatenotification/tests/Controller/AdminControllerTest.php +++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php @@ -202,7 +202,7 @@ public function testCreateCredentials() { } public function testGetPriority() { - $this->assertInternalType('int', $this->adminController->getPriority()); + $this->assertIsInt($this->adminController->getPriority()); } public function testGetSectionID() { diff --git a/tests/Settings/Panels/Admin/AppsTest.php b/tests/Settings/Panels/Admin/AppsTest.php index dc8cf5225ba9..497a4f3c4a1d 100644 --- a/tests/Settings/Panels/Admin/AppsTest.php +++ b/tests/Settings/Panels/Admin/AppsTest.php @@ -34,7 +34,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); } public function testGetPanel() { diff --git a/tests/Settings/Panels/Admin/BackgroundJobsTest.php b/tests/Settings/Panels/Admin/BackgroundJobsTest.php index fcb4fab357e7..19c2776d0546 100644 --- a/tests/Settings/Panels/Admin/BackgroundJobsTest.php +++ b/tests/Settings/Panels/Admin/BackgroundJobsTest.php @@ -35,7 +35,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(-100, $this->panel->getPriority()); $this->assertLessThan(100, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Admin/CertificatesTest.php b/tests/Settings/Panels/Admin/CertificatesTest.php index 3f5038aa20fe..7b8a9b63f9db 100644 --- a/tests/Settings/Panels/Admin/CertificatesTest.php +++ b/tests/Settings/Panels/Admin/CertificatesTest.php @@ -43,7 +43,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(-100, $this->panel->getPriority()); $this->assertLessThan(100, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Admin/EncryptionTest.php b/tests/Settings/Panels/Admin/EncryptionTest.php index 547227c201f6..29ca3c33ec03 100644 --- a/tests/Settings/Panels/Admin/EncryptionTest.php +++ b/tests/Settings/Panels/Admin/EncryptionTest.php @@ -30,7 +30,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(-100, $this->panel->getPriority()); $this->assertLessThan(100, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Admin/FileSharingTest.php b/tests/Settings/Panels/Admin/FileSharingTest.php index 76339b8b5d8e..6e867d787605 100644 --- a/tests/Settings/Panels/Admin/FileSharingTest.php +++ b/tests/Settings/Panels/Admin/FileSharingTest.php @@ -40,7 +40,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(-100, $this->panel->getPriority()); $this->assertLessThan(100, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Admin/LegacyTest.php b/tests/Settings/Panels/Admin/LegacyTest.php index e7331b7d7b73..e98e44c0d942 100644 --- a/tests/Settings/Panels/Admin/LegacyTest.php +++ b/tests/Settings/Panels/Admin/LegacyTest.php @@ -34,7 +34,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertLessThan(50, $this->panel->getPriority()); $this->assertGreaterThan(-50, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Admin/LegalTest.php b/tests/Settings/Panels/Admin/LegalTest.php index 6e6ab4173c68..956987d36c4e 100644 --- a/tests/Settings/Panels/Admin/LegalTest.php +++ b/tests/Settings/Panels/Admin/LegalTest.php @@ -44,7 +44,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(-100, $this->panel->getPriority()); $this->assertLessThan(100, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Admin/LoggingTest.php b/tests/Settings/Panels/Admin/LoggingTest.php index 0efc2360e0bd..27c9d00a5586 100644 --- a/tests/Settings/Panels/Admin/LoggingTest.php +++ b/tests/Settings/Panels/Admin/LoggingTest.php @@ -42,7 +42,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(-100, $this->panel->getPriority()); $this->assertLessThan(100, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Admin/MailTest.php b/tests/Settings/Panels/Admin/MailTest.php index d38b9731ac65..c5760d3e6ba1 100644 --- a/tests/Settings/Panels/Admin/MailTest.php +++ b/tests/Settings/Panels/Admin/MailTest.php @@ -38,7 +38,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(-100, $this->panel->getPriority()); $this->assertLessThan(100, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Admin/SecurityWarningTest.php b/tests/Settings/Panels/Admin/SecurityWarningTest.php index 02a8916fffee..08a38d1b8917 100644 --- a/tests/Settings/Panels/Admin/SecurityWarningTest.php +++ b/tests/Settings/Panels/Admin/SecurityWarningTest.php @@ -55,7 +55,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(100, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Admin/TipsTest.php b/tests/Settings/Panels/Admin/TipsTest.php index 8abc2668e871..41cbf29b166f 100644 --- a/tests/Settings/Panels/Admin/TipsTest.php +++ b/tests/Settings/Panels/Admin/TipsTest.php @@ -30,7 +30,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(-100, $this->panel->getPriority()); $this->assertLessThan(100, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Personal/ClientsTest.php b/tests/Settings/Panels/Personal/ClientsTest.php index 61027b015b02..7a8161ac77fa 100644 --- a/tests/Settings/Panels/Personal/ClientsTest.php +++ b/tests/Settings/Panels/Personal/ClientsTest.php @@ -38,7 +38,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertLessThan(100, $this->panel->getPriority()); $this->assertGreaterThan(-100, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Personal/LegacyTest.php b/tests/Settings/Panels/Personal/LegacyTest.php index 587b5b229a72..d4b3c206bff7 100644 --- a/tests/Settings/Panels/Personal/LegacyTest.php +++ b/tests/Settings/Panels/Personal/LegacyTest.php @@ -34,7 +34,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertLessThan(50, $this->panel->getPriority()); $this->assertGreaterThan(-50, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Personal/ProfileTest.php b/tests/Settings/Panels/Personal/ProfileTest.php index 5f8b2f3e281d..84315725cabb 100644 --- a/tests/Settings/Panels/Personal/ProfileTest.php +++ b/tests/Settings/Panels/Personal/ProfileTest.php @@ -54,7 +54,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(90, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Personal/QuotaTest.php b/tests/Settings/Panels/Personal/QuotaTest.php index 04dcd8edf576..efee62ec031c 100644 --- a/tests/Settings/Panels/Personal/QuotaTest.php +++ b/tests/Settings/Panels/Personal/QuotaTest.php @@ -34,7 +34,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(0, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Personal/TokensTest.php b/tests/Settings/Panels/Personal/TokensTest.php index 9a3732138bac..79ce498d9982 100644 --- a/tests/Settings/Panels/Personal/TokensTest.php +++ b/tests/Settings/Panels/Personal/TokensTest.php @@ -30,7 +30,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(-100, $this->panel->getPriority()); $this->assertLessThan(100, $this->panel->getPriority()); } diff --git a/tests/Settings/Panels/Personal/VersionTest.php b/tests/Settings/Panels/Personal/VersionTest.php index a54b5913a45d..90e7bcc297da 100644 --- a/tests/Settings/Panels/Personal/VersionTest.php +++ b/tests/Settings/Panels/Personal/VersionTest.php @@ -30,7 +30,7 @@ public function testGetSection() { } public function testGetPriority() { - $this->assertInternalType('int', $this->panel->getPriority()); + $this->assertIsInt($this->panel->getPriority()); $this->assertGreaterThan(-100, $this->panel->getPriority()); $this->assertLessThan(100, $this->panel->getPriority()); } diff --git a/tests/lib/Activity/ManagerTest.php b/tests/lib/Activity/ManagerTest.php index 1308ac465c4b..6d3a2d4cf744 100644 --- a/tests/lib/Activity/ManagerTest.php +++ b/tests/lib/Activity/ManagerTest.php @@ -102,17 +102,17 @@ public function testGetExtensionsInvalidExtension() { public function testNotificationTypes() { $result = $this->activityManager->getNotificationTypes('en'); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(2, $result); } public function testDefaultTypes() { $result = $this->activityManager->getDefaultTypes('stream'); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(1, $result); $result = $this->activityManager->getDefaultTypes('email'); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(0, $result); } @@ -161,11 +161,11 @@ public function testIsFilterValid() { public function testFilterNotificationTypes() { $result = $this->activityManager->filterNotificationTypes(['NT0', 'NT1', 'NT2', 'NT3'], 'fv01'); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(3, $result); $result = $this->activityManager->filterNotificationTypes(['NT0', 'NT1', 'NT2', 'NT3'], 'InvalidFilter'); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(4, $result); } diff --git a/tests/lib/Activity/NullSession/ManagerTest.php b/tests/lib/Activity/NullSession/ManagerTest.php index f15c3a488964..503f72ab564e 100644 --- a/tests/lib/Activity/NullSession/ManagerTest.php +++ b/tests/lib/Activity/NullSession/ManagerTest.php @@ -100,17 +100,17 @@ public function testGetExtensionsInvalidExtension() { public function testNotificationTypes() { $result = $this->activityManager->getNotificationTypes('en'); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(2, $result); } public function testDefaultTypes() { $result = $this->activityManager->getDefaultTypes('stream'); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(1, $result); $result = $this->activityManager->getDefaultTypes('email'); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(0, $result); } @@ -159,11 +159,11 @@ public function testIsFilterValid() { public function testFilterNotificationTypes() { $result = $this->activityManager->filterNotificationTypes(['NT0', 'NT1', 'NT2', 'NT3'], 'fv01'); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(3, $result); $result = $this->activityManager->filterNotificationTypes(['NT0', 'NT1', 'NT2', 'NT3'], 'InvalidFilter'); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(4, $result); } diff --git a/tests/lib/App/DependencyAnalyzerTest.php b/tests/lib/App/DependencyAnalyzerTest.php index cf295ec3089a..6c067e5f6639 100644 --- a/tests/lib/App/DependencyAnalyzerTest.php +++ b/tests/lib/App/DependencyAnalyzerTest.php @@ -95,7 +95,7 @@ public function testPhpVersion($expectedMissing, $minVersion, $maxVersion, $intS } $missing = $this->analyser->analyze($app); - $this->assertInternalType('array', $missing); + $this->assertIsArray($missing); $this->assertEquals($expectedMissing, $missing); } @@ -114,7 +114,7 @@ public function testDatabases($expectedMissing, $databases) { } $missing = $this->analyser->analyze($app); - $this->assertInternalType('array', $missing); + $this->assertIsArray($missing); $this->assertEquals($expectedMissing, $missing); } @@ -134,7 +134,7 @@ public function testCommand($expectedMissing, $commands) { } $missing = $this->analyser->analyze($app); - $this->assertInternalType('array', $missing); + $this->assertIsArray($missing); $this->assertEquals($expectedMissing, $missing); } @@ -154,7 +154,7 @@ public function testLibs($expectedMissing, $libs) { $missing = $this->analyser->analyze($app); - $this->assertInternalType('array', $missing); + $this->assertIsArray($missing); $this->assertEquals($expectedMissing, $missing); } @@ -173,7 +173,7 @@ public function testOS($expectedMissing, $oss) { $missing = $this->analyser->analyze($app); - $this->assertInternalType('array', $missing); + $this->assertIsArray($missing); $this->assertEquals($expectedMissing, $missing); } @@ -192,7 +192,7 @@ public function testOC($expectedMissing, $oc) { $missing = $this->analyser->analyze($app); - $this->assertInternalType('array', $missing); + $this->assertIsArray($missing); $this->assertEquals($expectedMissing, $missing); } diff --git a/tests/lib/Comments/ManagerTest.php b/tests/lib/Comments/ManagerTest.php index 72bb049dcd1a..975839503bed 100644 --- a/tests/lib/Comments/ManagerTest.php +++ b/tests/lib/Comments/ManagerTest.php @@ -228,7 +228,7 @@ public function testGetForObject() { $manager = $this->getManager(); $comments = $manager->getForObject('files', 'file64'); - $this->assertInternalType('array', $comments); + $this->assertIsArray($comments); $this->assertSame(\count($comments), 1); $this->assertInstanceOf(\OCP\Comments\IComment::class, $comments[0]); $this->assertSame($comments[0]->getMessage(), 'nice one'); @@ -248,7 +248,7 @@ public function testGetForObjectWithLimitAndOffset() { do { $comments = $manager->getForObject('files', 'file64', 3, $offset); - $this->assertInternalType('array', $comments); + $this->assertIsArray($comments); foreach ($comments as $comment) { $this->assertInstanceOf(\OCP\Comments\IComment::class, $comment); $this->assertSame($comment->getMessage(), 'nice one'); @@ -287,7 +287,7 @@ public function testGetForObjectWithLimitAndOffsetAndDateTimeConstraint() { do { $comments = $manager->getForObject('files', 'file64', 3, $offset, new \DateTime('-4 hours')); - $this->assertInternalType('array', $comments); + $this->assertIsArray($comments); foreach ($comments as $comment) { $this->assertInstanceOf(\OCP\Comments\IComment::class, $comment); $this->assertSame($comment->getMessage(), 'nice one'); diff --git a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php index 5640053ccd73..cd83004b7e02 100644 --- a/tests/lib/DB/QueryBuilder/QueryBuilderTest.php +++ b/tests/lib/DB/QueryBuilder/QueryBuilderTest.php @@ -1135,7 +1135,7 @@ public function testGetLastInsertId() { $actual = $qB->getLastInsertId(); $this->assertNotNull($actual); - $this->assertInternalType('int', $actual); + $this->assertIsInt($actual); $this->assertEquals($this->connection->lastInsertId('*PREFIX*properties'), $actual); $qB->delete('properties') diff --git a/tests/lib/Files/Cache/ScannerTest.php b/tests/lib/Files/Cache/ScannerTest.php index def748e105fd..8eb20a5d60c2 100644 --- a/tests/lib/Files/Cache/ScannerTest.php +++ b/tests/lib/Files/Cache/ScannerTest.php @@ -190,8 +190,8 @@ public function testReuseExisting() { $this->cache->put('folder', ['mtime' => $this->storage->filemtime('folder'), 'storage_mtime' => $this->storage->filemtime('folder')]); $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_SIZE); $newData = $this->cache->get(''); - $this->assertInternalType('string', $oldData['etag']); - $this->assertInternalType('string', $newData['etag']); + $this->assertIsString($oldData['etag']); + $this->assertIsString($newData['etag']); $this->assertNotSame($oldData['etag'], $newData['etag']); $this->assertEquals($oldData['size'], $newData['size']); @@ -260,11 +260,11 @@ public function testETagRecreation() { $this->scanner->scan('', \OC\Files\Cache\Scanner::SCAN_SHALLOW, \OC\Files\Cache\Scanner::REUSE_ETAG); /** @var CacheEntry $data0 */ $data0 = $this->cache->get('folder/bar.txt'); - $this->assertInternalType('string', $data0['etag']); + $this->assertIsString($data0['etag']); $data1 = $this->cache->get('folder'); - $this->assertInternalType('string', $data1['etag']); + $this->assertIsString($data1['etag']); $data2 = $this->cache->get(''); - $this->assertInternalType('string', $data2['etag']); + $this->assertIsString($data2['etag']); $data0['etag'] = ''; $this->cache->put('folder/bar.txt', $data0->getData()); @@ -273,7 +273,7 @@ public function testETagRecreation() { // verify cache content $newData0 = $this->cache->get('folder/bar.txt'); - $this->assertInternalType('string', $newData0['etag']); + $this->assertIsString($newData0['etag']); $this->assertNotEmpty($newData0['etag']); } diff --git a/tests/lib/Files/Cache/UpdaterLegacyTest.php b/tests/lib/Files/Cache/UpdaterLegacyTest.php index 9938438b1d86..7a2063e0d52c 100644 --- a/tests/lib/Files/Cache/UpdaterLegacyTest.php +++ b/tests/lib/Files/Cache/UpdaterLegacyTest.php @@ -94,13 +94,13 @@ public function testWrite() { Filesystem::file_put_contents('foo.txt', 'asd'); $cachedData = $this->cache->get('foo.txt'); $this->assertEquals(3, $cachedData['size']); - $this->assertInternalType('string', $fooCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($fooCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($fooCachedData['etag'], $cachedData['etag']); $cachedData = $this->cache->get(''); $this->assertEquals(2 * $textSize + $imageSize + 3, $cachedData['size']); - $this->assertInternalType('string', $rootCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($rootCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($rootCachedData['etag'], $cachedData['etag']); $rootCachedData = $cachedData; @@ -112,8 +112,8 @@ public function testWrite() { $mtime = $cachedData['mtime']; $cachedData = $this->cache->get(''); $this->assertEquals(2 * $textSize + $imageSize + 2 * 3, $cachedData['size']); - $this->assertInternalType('string', $rootCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($rootCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($rootCachedData['etag'], $cachedData['etag']); $this->assertGreaterThanOrEqual($rootCachedData['mtime'], $mtime); } @@ -133,13 +133,13 @@ public function testWriteWithMountPoints() { $mtime = $cachedData['mtime']; $cachedData = $cache2->get(''); - $this->assertInternalType('string', $substorageCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($substorageCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($substorageCachedData['etag'], $cachedData['etag']); $cachedData = $view->getFileInfo('folder'); - $this->assertInternalType('string', $folderCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($folderCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($folderCachedData['etag'], $cachedData['etag']); } @@ -154,8 +154,8 @@ public function testDelete() { $this->assertFalse($this->cache->inCache('foo.txt')); $cachedData = $this->cache->get(''); $this->assertEquals(2 * $textSize + $imageSize, $cachedData['size']); - $this->assertInternalType('string', $rootCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($rootCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($rootCachedData['etag'], $cachedData['etag']); $this->assertGreaterThanOrEqual($rootCachedData['mtime'], $cachedData['mtime']); $rootCachedData = $cachedData; @@ -163,15 +163,15 @@ public function testDelete() { Filesystem::mkdir('bar_folder'); $this->assertTrue($this->cache->inCache('bar_folder')); $cachedData = $this->cache->get(''); - $this->assertInternalType('string', $rootCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($rootCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($rootCachedData['etag'], $cachedData['etag']); $rootCachedData = $cachedData; Filesystem::rmdir('bar_folder'); $this->assertFalse($this->cache->inCache('bar_folder')); $cachedData = $this->cache->get(''); - $this->assertInternalType('string', $rootCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($rootCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($rootCachedData['etag'], $cachedData['etag']); $this->assertGreaterThanOrEqual($rootCachedData['mtime'], $cachedData['mtime']); } @@ -189,14 +189,14 @@ public function testDeleteWithMountPoints() { $this->assertFalse($cache2->inCache('foo.txt')); $cachedData = $cache2->get(''); - $this->assertInternalType('string', $substorageCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($substorageCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($substorageCachedData['etag'], $cachedData['etag']); $this->assertGreaterThanOrEqual($substorageCachedData['mtime'], $cachedData['mtime']); $cachedData = $view->getFileInfo('folder'); - $this->assertInternalType('string', $folderCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($folderCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($folderCachedData['etag'], $cachedData['etag']); $this->assertGreaterThanOrEqual($folderCachedData['mtime'], $cachedData['mtime']); } @@ -218,8 +218,8 @@ public function testRename() { $mtime = $cachedData['mtime']; $cachedData = $this->cache->get(''); $this->assertEquals(3 * $textSize + $imageSize, $cachedData['size']); - $this->assertInternalType('string', $rootCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($rootCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($rootCachedData['etag'], $cachedData['etag']); } @@ -249,15 +249,15 @@ public function testRenameWithMountPoints() { $mtime = $cachedData['mtime']; $cachedData = $cache2->get(''); - $this->assertInternalType('string', $substorageCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($substorageCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($substorageCachedData['etag'], $cachedData['etag']); // rename can cause mtime change - invalid assert // $this->assertEquals($mtime, $cachedData['mtime']); $cachedData = $view->getFileInfo('folder'); - $this->assertInternalType('string', $folderCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($folderCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($folderCachedData['etag'], $cachedData['etag']); // rename can cause mtime change - invalid assert // $this->assertEquals($mtime, $cachedData['mtime']); @@ -268,13 +268,13 @@ public function testTouch() { $fooCachedData = $this->cache->get('foo.txt'); Filesystem::touch('foo.txt'); $cachedData = $this->cache->get('foo.txt'); - $this->assertInternalType('string', $fooCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($fooCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertGreaterThanOrEqual($fooCachedData['mtime'], $cachedData['mtime']); $cachedData = $this->cache->get(''); - $this->assertInternalType('string', $rootCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($rootCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($rootCachedData['etag'], $cachedData['etag']); $this->assertGreaterThanOrEqual($rootCachedData['mtime'], $cachedData['mtime']); $rootCachedData = $cachedData; @@ -285,19 +285,19 @@ public function testTouch() { $this->cache->put('', ['mtime' => $time - 100]); Filesystem::touch('folder/bar.txt', $time); $cachedData = $this->cache->get('folder/bar.txt'); - $this->assertInternalType('string', $barCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($barCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($barCachedData['etag'], $cachedData['etag']); $this->assertEquals($time, $cachedData['mtime']); $cachedData = $this->cache->get('folder'); - $this->assertInternalType('string', $folderCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($folderCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($folderCachedData['etag'], $cachedData['etag']); $cachedData = $this->cache->get(''); - $this->assertInternalType('string', $rootCachedData['etag']); - $this->assertInternalType('string', $cachedData['etag']); + $this->assertIsString($rootCachedData['etag']); + $this->assertIsString($cachedData['etag']); $this->assertNotSame($rootCachedData['etag'], $cachedData['etag']); $this->assertEquals($time, $cachedData['mtime']); } diff --git a/tests/lib/Files/MetaFilesTest.php b/tests/lib/Files/MetaFilesTest.php index e37eb3ea35f7..c422e549a3c5 100644 --- a/tests/lib/Files/MetaFilesTest.php +++ b/tests/lib/Files/MetaFilesTest.php @@ -127,7 +127,7 @@ public function testMetaInNodeAPI() { $this->assertEquals([], $metaNodeOfFile->getHeaders()); $this->assertEquals($file, $metaNodeOfFile->getContentDispositionFileName()); $this->assertEquals('text/plain', $metaNodeOfFile->getMimetype()); - $this->assertInternalType('string', $metaNodeOfFile->getEtag()); + $this->assertIsString($metaNodeOfFile->getEtag()); $this->assertGreaterThan(0, \strlen($metaNodeOfFile->getEtag())); $this->assertInstanceOf(IMountPoint::class, $metaNodeOfFile->getMountPoint()); $thumbnail = $metaNodeOfFile->getThumbnail([]); diff --git a/tests/lib/Files/Storage/DavTest.php b/tests/lib/Files/Storage/DavTest.php index d8ecd327e3d3..97f8218dd46a 100644 --- a/tests/lib/Files/Storage/DavTest.php +++ b/tests/lib/Files/Storage/DavTest.php @@ -1155,7 +1155,7 @@ public function testGetEtagFallback() { ->willReturn([]); // unique id - $this->assertInternalType('string', $this->instance->getETag('some%dir')); + $this->assertIsString($this->instance->getETag('some%dir')); } public function testGetEtagUnexist() { diff --git a/tests/lib/Files/Storage/Wrapper/ChecksumTest.php b/tests/lib/Files/Storage/Wrapper/ChecksumTest.php index 85e758d97db2..1d40465ead40 100644 --- a/tests/lib/Files/Storage/Wrapper/ChecksumTest.php +++ b/tests/lib/Files/Storage/Wrapper/ChecksumTest.php @@ -62,7 +62,7 @@ public function testFilePutContentsCalculatesChecksum() { public function testWriteToFileHandleCalculatesChecksum() { $handle = $this->instance->fopen($this->testFileName, 'w'); - $this->assertInternalType('resource', $handle); + $this->assertIsResource($handle); $this->assertNotFalse(\fwrite($handle, self::TEST_DATA)); $this->assertNotFalse(\fclose($handle)); diff --git a/tests/lib/Files/Storage/Wrapper/DirMaskTest.php b/tests/lib/Files/Storage/Wrapper/DirMaskTest.php index 4d5e527a3fed..90b8cb0ad854 100644 --- a/tests/lib/Files/Storage/Wrapper/DirMaskTest.php +++ b/tests/lib/Files/Storage/Wrapper/DirMaskTest.php @@ -134,13 +134,11 @@ public function testFilePutContents() { public function testFopen() { $storage = $this->getStorage(Constants::PERMISSION_ALL); - $this->assertInternalType( - 'resource', $storage->fopen('masked/test.txt', 'r+') + $this->assertIsResource($storage->fopen('masked/test.txt', 'r+') ); $storage = $this->getStorage(Constants::PERMISSION_READ); - $this->assertInternalType( - 'resource', $storage->fopen('masked/test.txt', 'r') + $this->assertIsResource($storage->fopen('masked/test.txt', 'r') ); $storage = $this->getStorage(Constants::PERMISSION_READ); diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index fa7d8e469637..b250f3a4b4d6 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -876,11 +876,11 @@ public function xtestLongPath() { $longPath = $folderName; foreach (\range(0, $depth - 1) as $i) { $cachedFolder = $cache->get($longPath); - $this->assertInternalType('array', $cachedFolder, "No cache entry for folder at $i"); + $this->assertIsArray($cachedFolder, "No cache entry for folder at $i"); $this->assertEquals($folderName, $cachedFolder['name'], "Wrong cache entry for folder at $i"); $cachedFile = $cache->get($longPath . '/test.txt'); - $this->assertInternalType('array', $cachedFile, "No cache entry for file at $i"); + $this->assertIsArray($cachedFile, "No cache entry for file at $i"); $this->assertEquals('test.txt', $cachedFile['name'], "Wrong cache entry for file at $i"); $longPath .= $ds . $folderName; diff --git a/tests/lib/Group/ManagerTest.php b/tests/lib/Group/ManagerTest.php index f33333111af2..7ba5aaeedc75 100644 --- a/tests/lib/Group/ManagerTest.php +++ b/tests/lib/Group/ManagerTest.php @@ -538,7 +538,7 @@ public function testGetUserGroupIds() { $this->assertCount(2, $groups); foreach ($groups as $group) { - $this->assertInternalType('string', $group); + $this->assertIsString($group); } } diff --git a/tests/lib/OCS/PrivatedataTest.php b/tests/lib/OCS/PrivatedataTest.php index 6a63896319b2..af0bbe18fce2 100644 --- a/tests/lib/OCS/PrivatedataTest.php +++ b/tests/lib/OCS/PrivatedataTest.php @@ -166,7 +166,7 @@ public function deleteWithEmptyKeysProvider() { public function assertOcsResult($expectedArraySize, $result) { $this->assertEquals(100, $result->getStatusCode()); $data = $result->getData(); - $this->assertInternalType('array', $data); + $this->assertIsArray($data); $this->assertCount($expectedArraySize, $data); } } diff --git a/tests/lib/Share/ShareTest.php b/tests/lib/Share/ShareTest.php index 5b98d9f7bf23..af75a16de009 100644 --- a/tests/lib/Share/ShareTest.php +++ b/tests/lib/Share/ShareTest.php @@ -231,7 +231,7 @@ protected function shareUserOneTestFileWithUserTwo() { protected function shareUserTestFileAsLink() { \OC_User::setUserId($this->user1); $result = \OCP\Share::shareItem('test', 'test.txt', \OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ); - $this->assertInternalType('string', $result); + $this->assertIsString($result); } /** @@ -612,9 +612,7 @@ public function testShareWithGroupAndUserBothHaveTheSameId() { */ protected function getShareByValidToken($token) { $row = \OCP\Share::getShareByToken($token); - $this->assertInternalType( - 'array', - $row, + $this->assertIsArray($row, "Failed asserting that a share for token $token exists." ); return $row; @@ -747,9 +745,7 @@ public function testGetShareSubItemsWhenUserNotInGroup() { public function testShareItemWithLink() { \OC_User::setUserId($this->user1); $token = \OCP\Share::shareItem('test', 'test.txt', \OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ); - $this->assertInternalType( - 'string', - $token, + $this->assertIsString($token, 'Failed asserting that user 1 successfully shared text.txt as link with token.' ); @@ -795,9 +791,7 @@ public function testShareItemWithLinkAndDefaultExpireDate() { $config->setAppValue('core', 'shareapi_expire_after_n_days', '2'); $token = \OCP\Share::shareItem('test', 'test.txt', \OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ); - $this->assertInternalType( - 'string', - $token, + $this->assertIsString($token, 'Failed asserting that user 1 successfully shared text.txt as link with token.' ); @@ -1121,9 +1115,7 @@ public function testClearExpireDateWhileEnforced() { \OC::$server->getAppConfig()->setValue('core', 'shareapi_enforce_expire_date', 'yes'); $token = \OCP\Share::shareItem('test', 'test.txt', \OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ); - $this->assertInternalType( - 'string', - $token, + $this->assertIsString($token, 'Failed asserting that user 1 successfully shared text.txt as link with token.' ); @@ -1474,7 +1466,7 @@ public function testReshareWithLinkDefaultExpirationDate() { //User 2 shares as link \OC_User::setUserId($this->user2); $result = \OCP\Share::shareItem('test', 'test.txt', \OCP\Share::SHARE_TYPE_LINK, null, \OCP\Constants::PERMISSION_READ); - $this->assertInternalType('string', $result); + $this->assertIsString($result); //Check if expire date is correct $result = \OCP\Share::getItemShared('test', 'test.txt'); diff --git a/tests/lib/User/SyncServiceTest.php b/tests/lib/User/SyncServiceTest.php index 39763294b9dd..7c38bd721891 100644 --- a/tests/lib/User/SyncServiceTest.php +++ b/tests/lib/User/SyncServiceTest.php @@ -188,7 +188,7 @@ public function testAnalyseExistingUsers() { $backend = $this->createMock(UserInterface::class); $result = $s->analyzeExistingUsers($backend, function () { }); - $this->assertInternalType('array', $result); + $this->assertIsArray($result); $this->assertCount(2, $result); } diff --git a/tests/lib/UtilTest.php b/tests/lib/UtilTest.php index e68db139b6d2..aceb0f8d05f0 100644 --- a/tests/lib/UtilTest.php +++ b/tests/lib/UtilTest.php @@ -18,15 +18,15 @@ class UtilTest extends \Test\TestCase { public function testGetVersion() { $version = \OCP\Util::getVersion(); - $this->assertInternalType('array', $version); + $this->assertIsArray($version); foreach ($version as $num) { - $this->assertInternalType('int', $num); + $this->assertIsInt($num); } } public function testGetVersionString() { $version = \OC_Util::getVersionString(); - $this->assertInternalType('string', $version); + $this->assertIsString($version); } /** @@ -34,7 +34,7 @@ public function testGetVersionString() { */ public function testGetEditionString() { $edition = \OC_Util::getEditionString(); - $this->assertInternalType('string', $edition); + $this->assertIsString($edition); } public function testFormatDate() { From fa95da82305f582e8572a74a8d98ab193966ee2e Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sun, 1 Dec 2019 20:19:50 +0545 Subject: [PATCH 09/15] Adjust assertContains assertNotContains for strings --- .../tests/unit/Command/CleanupChunksTest.php | 9 ++-- .../tests/Command/PollIncomingSharesTest.php | 11 +++-- .../tests/Panels/GeneralPersonalPanelTest.php | 2 +- .../tests/Panels/SharingPersonalPanelTest.php | 2 +- apps/federation/tests/PanelTest.php | 5 ++- apps/files/tests/Command/ScanTest.php | 33 +++++++------- .../tests/Command/TransferOwnershipTest.php | 4 +- .../tests/Command/VerifyChecksumsTest.php | 16 +++---- .../Panels/Personal/PersonalPanelTest.php | 10 ++++- .../tests/Command/ExpireTrashTest.php | 2 +- .../tests/Command/ExpireVersionsTest.php | 2 +- tests/Core/Command/Apps/AppsDisableTest.php | 2 +- tests/Core/Command/Apps/AppsEnableTest.php | 2 +- tests/Core/Command/Apps/AppsGetPathTest.php | 2 +- tests/Core/Command/Apps/AppsListTest.php | 2 +- .../Command/Background/Queue/DeleteTest.php | 2 +- .../Command/Background/Queue/StatusTest.php | 4 +- tests/Core/Command/Group/AddMemberTest.php | 2 +- tests/Core/Command/Group/AddTest.php | 2 +- .../Command/Group/ListGroupMembersTest.php | 2 +- tests/Core/Command/Group/ListGroupsTest.php | 2 +- tests/Core/Command/Group/RemoveMemberTest.php | 2 +- .../Maintenance/DataFingerprintTest.php | 5 ++- tests/Core/Command/Maintenance/RepairTest.php | 2 +- tests/Core/Command/System/CronTest.php | 20 +++++++-- .../Command/TwoFactorAuth/DisableTest.php | 2 +- .../Core/Command/TwoFactorAuth/EnableTest.php | 2 +- tests/Core/Command/User/AddTest.php | 2 +- tests/Core/Command/User/DeleteTest.php | 7 ++- tests/Core/Command/User/DisableTest.php | 2 +- tests/Core/Command/User/EnableTest.php | 2 +- .../Core/Command/User/ListUserGroupsTest.php | 2 +- tests/Core/Command/User/ListUsersTest.php | 2 +- .../Controller/SettingsPageControllerTest.php | 6 +-- tests/Settings/Panels/Admin/AppsTest.php | 2 +- .../Panels/Admin/BackgroundJobsTest.php | 2 +- .../Panels/Admin/CertificatesTest.php | 8 ++-- .../Settings/Panels/Admin/EncryptionTest.php | 2 +- .../Settings/Panels/Admin/FileSharingTest.php | 5 ++- tests/Settings/Panels/Admin/LegacyTest.php | 4 +- tests/Settings/Panels/Admin/LegalTest.php | 2 +- tests/Settings/Panels/Admin/LoggingTest.php | 4 +- tests/Settings/Panels/Admin/MailTest.php | 5 ++- .../Panels/Admin/SecurityWarningTest.php | 5 ++- tests/Settings/Panels/Admin/TipsTest.php | 5 ++- .../Settings/Panels/Personal/ClientsTest.php | 6 +-- tests/Settings/Panels/Personal/LegacyTest.php | 4 +- .../Settings/Panels/Personal/ProfileTest.php | 8 ++-- tests/Settings/Panels/Personal/QuotaTest.php | 4 +- tests/Settings/Panels/Personal/TokensTest.php | 2 +- .../Settings/Panels/Personal/VersionTest.php | 2 +- .../Http/DownloadResponseTest.php | 4 +- tests/lib/DB/DBSchemaTest.php | 4 +- tests/lib/L10N/FactoryTest.php | 2 +- tests/lib/LoggerTest.php | 45 ++++++++++++------- tests/lib/SetupTest.php | 5 ++- tests/lib/legacy/DefaultsTest.php | 8 ++-- 57 files changed, 189 insertions(+), 123 deletions(-) diff --git a/apps/dav/tests/unit/Command/CleanupChunksTest.php b/apps/dav/tests/unit/Command/CleanupChunksTest.php index f28d6f6f6c64..cc852a888c55 100644 --- a/apps/dav/tests/unit/Command/CleanupChunksTest.php +++ b/apps/dav/tests/unit/Command/CleanupChunksTest.php @@ -59,7 +59,10 @@ public function testCommandInput($inputDays, $expectedDays) { 'age-in-days' => $inputDays ]); $output = $this->commandTester->getDisplay(); - $this->assertContains("Cleaning chunks older than $expectedDays days", $output); + $this->assertStringContainsString( + "Cleaning chunks older than $expectedDays days", + $output + ); } public function testCommand() { @@ -77,8 +80,8 @@ public function testCommand() { $this->commandTester->execute([]); $output = $this->commandTester->getDisplay(); - $this->assertContains("Cleaning chunks older than 2 days", $output); - $this->assertContains("Cleaning chunks for $userId", $output); + $this->assertStringContainsString("Cleaning chunks older than 2 days", $output); + $this->assertStringContainsString("Cleaning chunks for $userId", $output); $this->assertFalse($view->file_exists($uploadId)); } diff --git a/apps/federatedfilesharing/tests/Command/PollIncomingSharesTest.php b/apps/federatedfilesharing/tests/Command/PollIncomingSharesTest.php index 3b8f1e040614..d956580c95c7 100644 --- a/apps/federatedfilesharing/tests/Command/PollIncomingSharesTest.php +++ b/apps/federatedfilesharing/tests/Command/PollIncomingSharesTest.php @@ -106,7 +106,10 @@ public function testWithFilesSharingDisabled() { $this->commandTester = new CommandTester($command); $this->commandTester->execute([]); $output = $this->commandTester->getDisplay(); - $this->assertContains("Polling is not possible when files_sharing app is disabled. Please enable it with 'occ app:enable files_sharing'", $output); + $this->assertStringContainsString( + "Polling is not possible when files_sharing app is disabled. Please enable it with 'occ app:enable files_sharing'", + $output + ); } public function testUnavailableStorage() { @@ -143,7 +146,7 @@ public function testUnavailableStorage() { $this->dbConnection->method('getQueryBuilder')->willReturn($qbMock); $this->commandTester->execute([]); $output = $this->commandTester->getDisplay(); - $this->assertContains( + $this->assertStringContainsString( 'Skipping external share with id "50" from remote "example.org". Reason: "Ooops"', $output ); @@ -166,7 +169,7 @@ public function testNotExistingUser() { $this->dbConnection->method('getQueryBuilder')->willReturn($qbMock); $this->commandTester->execute([]); $output = $this->commandTester->getDisplay(); - $this->assertContains( + $this->assertStringContainsString( 'Skipping user "foo". Reason: user manager was unable to resolve the uid into the user object', $output ); @@ -207,7 +210,7 @@ public function testPollingUnsharedMount() { $this->dbConnection->method('getQueryBuilder')->willReturn($qbMock); $this->commandTester->execute([]); $output = $this->commandTester->getDisplay(); - $this->assertContains( + $this->assertStringContainsString( 'Remote "example.org" reports that external share with id "50" no longer exists. Removing it..', $output ); diff --git a/apps/federatedfilesharing/tests/Panels/GeneralPersonalPanelTest.php b/apps/federatedfilesharing/tests/Panels/GeneralPersonalPanelTest.php index bf6319c685c3..c8aabce2d201 100644 --- a/apps/federatedfilesharing/tests/Panels/GeneralPersonalPanelTest.php +++ b/apps/federatedfilesharing/tests/Panels/GeneralPersonalPanelTest.php @@ -79,6 +79,6 @@ public function testGetPanel() { $this->userSession->expects($this->once())->method('getUser')->willReturn($mockUser); $this->shareProvider->expects($this->once())->method('isOutgoingServer2serverShareEnabled')->willReturn(true); $templateHtml = $this->panel->getPanel()->fetchPage(); - $this->assertContains('
assertStringContainsString('
willReturn($globalConfigs['auto_accept_trusted']); $templateHtml = $this->sharingPersonalPanel->getPanel()->fetchPage(); - $this->assertContains($expectedString, $templateHtml); + $this->assertStringContainsString($expectedString, $templateHtml); } } diff --git a/apps/federation/tests/PanelTest.php b/apps/federation/tests/PanelTest.php index 2a5b27db1dc8..c06b6b599fb2 100644 --- a/apps/federation/tests/PanelTest.php +++ b/apps/federation/tests/PanelTest.php @@ -99,6 +99,9 @@ public function testGetPanel() { $statement->expects($this->once())->method('fetchAll')->willReturn([]); $this->connection->expects($this->once())->method('getQueryBuilder')->willReturn($queryBuilder); $templateHtml = $this->panel->getPanel()->fetchPage(); - $this->assertContains('
', $templateHtml); + $this->assertStringContainsString( + '
', + $templateHtml + ); } } diff --git a/apps/files/tests/Command/ScanTest.php b/apps/files/tests/Command/ScanTest.php index fad75d0973a0..d82b224057a9 100644 --- a/apps/files/tests/Command/ScanTest.php +++ b/apps/files/tests/Command/ScanTest.php @@ -156,7 +156,7 @@ public function dataInput() { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function userInputData() { @@ -181,9 +181,12 @@ public function testGroupPaginationForUsers($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); //If pagination works then below assert shouldn't fail - $this->assertNotContains("Starting scan for user 1 out of $numberOfUsersInGroup", $output); + $this->assertStringNotContainsString( + "Starting scan for user 1 out of $numberOfUsersInGroup", + $output + ); } public function multipleGroupTest() { @@ -237,18 +240,18 @@ public function testMultipleGroups($input) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); if (\count($groups) === 2) { - $this->assertContains('Starting scan for user 1 out of 10 (user1)', $output); - $this->assertContains('Starting scan for user 1 out of 10 (user11)', $output); + $this->assertStringContainsString('Starting scan for user 1 out of 10 (user1)', $output); + $this->assertStringContainsString('Starting scan for user 1 out of 10 (user11)', $output); } elseif (\count($groups) === 3) { - $this->assertContains('Starting scan for user 1 out of 10 (user1)', $output); - $this->assertContains('Starting scan for user 1 out of 10 (user11)', $output); - $this->assertContains('Starting scan for user 1 out of 10 (user21)', $output); - $this->assertContains('Starting scan for user 10 out of 10 (user30)', $output); + $this->assertStringContainsString('Starting scan for user 1 out of 10 (user1)', $output); + $this->assertStringContainsString('Starting scan for user 1 out of 10 (user11)', $output); + $this->assertStringContainsString('Starting scan for user 1 out of 10 (user21)', $output); + $this->assertStringContainsString('Starting scan for user 10 out of 10 (user30)', $output); } elseif (\count($groups) === 4) { - $this->assertContains('Starting scan for user 1 out of 10 (user1)', $output); - $this->assertContains('Starting scan for user 1 out of 20 (user11)', $output); - $this->assertContains('Starting scan for user 11 out of 20 (user21)', $output); - $this->assertContains('Starting scan for user 10 out of 10 (user40)', $output); + $this->assertStringContainsString('Starting scan for user 1 out of 10 (user1)', $output); + $this->assertStringContainsString('Starting scan for user 1 out of 20 (user11)', $output); + $this->assertStringContainsString('Starting scan for user 11 out of 20 (user21)', $output); + $this->assertStringContainsString('Starting scan for user 10 out of 10 (user40)', $output); } else { $this->fail( "testMultipleGroups supports testing with 2,3, or 4 groups but the input has $groups groups" @@ -402,8 +405,8 @@ public function testScanRepairAllNoSingleUserMode() { $output = $this->commandTester->getDisplay(); - $this->assertContains('Please switch to single user mode', $output); - $this->assertContains('specify a user to repair', $output); + $this->assertStringContainsString('Please switch to single user mode', $output); + $this->assertStringContainsString('specify a user to repair', $output); $storageId = $this->getStorageId('home::' . $this->scanUser1->getUID()); $this->assertFalse($this->getFileCacheEntry($storageId, 'files/toscan')); diff --git a/apps/files/tests/Command/TransferOwnershipTest.php b/apps/files/tests/Command/TransferOwnershipTest.php index c7364a0bd5fc..ee33198951c3 100644 --- a/apps/files/tests/Command/TransferOwnershipTest.php +++ b/apps/files/tests/Command/TransferOwnershipTest.php @@ -178,7 +178,7 @@ public function testTransferAllFiles() { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains('Transferring files to target-user', $output); + $this->assertStringContainsString('Transferring files to target-user', $output); $sourceShares = $this->shareManager->getSharesBy($this->sourceUser->getUID(), Share::SHARE_TYPE_USER); $targetShares = $this->shareManager->getSharesBy($this->targetUser->getUID(), Share::SHARE_TYPE_USER); $this->assertCount(0, $sourceShares); @@ -209,7 +209,7 @@ public function testTransferSpecificFolder($path, $expectedSourceShareCount, $ex $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains('Transferring files to target-user', $output); + $this->assertStringContainsString('Transferring files to target-user', $output); $sourceShares = $this->shareManager->getSharesBy($this->sourceUser->getUID(), Share::SHARE_TYPE_USER); $targetShares = $this->shareManager->getSharesBy($this->targetUser->getUID(), Share::SHARE_TYPE_USER); $this->assertCount($expectedSourceShareCount, $sourceShares); diff --git a/apps/files/tests/Command/VerifyChecksumsTest.php b/apps/files/tests/Command/VerifyChecksumsTest.php index 4b9602f9997c..42758a68b601 100644 --- a/apps/files/tests/Command/VerifyChecksumsTest.php +++ b/apps/files/tests/Command/VerifyChecksumsTest.php @@ -190,11 +190,11 @@ public function testFilesWithBrokenChecksumsAreDisplayed() { $output = $this->cmd->getDisplay(); - $this->assertContains($file1->getInternalPath(), $output); - $this->assertContains($file2->getInternalPath(), $output); - $this->assertContains(self::BROKEN_CHECKSUM_STRING, $output); - $this->assertContains($this->testFiles[4]['expectedChecksums'](), $output); - $this->assertContains($this->testFiles[7]['expectedChecksums'](), $output); + $this->assertStringContainsString($file1->getInternalPath(), $output); + $this->assertStringContainsString($file2->getInternalPath(), $output); + $this->assertStringContainsString(self::BROKEN_CHECKSUM_STRING, $output); + $this->assertStringContainsString($this->testFiles[4]['expectedChecksums'](), $output); + $this->assertStringContainsString($this->testFiles[7]['expectedChecksums'](), $output); } /** @@ -314,8 +314,8 @@ public function testFileWithoutChecksumIsIgnored() { $this->cmd->execute([], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE]); $output = $this->cmd->getDisplay(); - $this->assertContains('somefile.txt => No Checksum', $output); - $this->assertContains('Skipping', $output); + $this->assertStringContainsString('somefile.txt => No Checksum', $output); + $this->assertStringContainsString('Skipping', $output); } public function testFileInCacheButNotOnDiskIsIgnored() { @@ -329,7 +329,7 @@ public function testFileInCacheButNotOnDiskIsIgnored() { $this->cmd->execute([], ['verbosity' => OutputInterface::VERBOSITY_VERBOSE]); $output = $this->cmd->getDisplay(); - $this->assertContains('x-file.txt => File is in file-cache but doesn\'t exist on storage/disk', $output); + $this->assertStringContainsString('x-file.txt => File is in file-cache but doesn\'t exist on storage/disk', $output); } public function testInvalidArgs() { diff --git a/apps/files_sharing/tests/Panels/Personal/PersonalPanelTest.php b/apps/files_sharing/tests/Panels/Personal/PersonalPanelTest.php index b779a82d15ca..c0516e64672d 100644 --- a/apps/files_sharing/tests/Panels/Personal/PersonalPanelTest.php +++ b/apps/files_sharing/tests/Panels/Personal/PersonalPanelTest.php @@ -80,7 +80,10 @@ public function testGetPanelEmpty() { ->willReturn('no'); $templateHtml = $this->personalPanel->getPanel()->fetchPage(); - $this->assertContains('

Nothing to configure.

', $templateHtml); + $this->assertStringContainsString( + '

Nothing to configure.

', + $templateHtml + ); } public function testGetPanelNotEmpty() { @@ -100,6 +103,9 @@ public function testGetPanelNotEmpty() { ->willReturn('yes'); $templateHtml = $this->personalPanel->getPanel()->fetchPage(); - $this->assertContains('
', $templateHtml); + $this->assertStringContainsString( + '', + $templateHtml + ); } } diff --git a/apps/files_trashbin/tests/Command/ExpireTrashTest.php b/apps/files_trashbin/tests/Command/ExpireTrashTest.php index 9cd872e766d8..49890dc7ad8b 100644 --- a/apps/files_trashbin/tests/Command/ExpireTrashTest.php +++ b/apps/files_trashbin/tests/Command/ExpireTrashTest.php @@ -57,6 +57,6 @@ public function testExpireNoMaxRetention() { ->willReturn(false); $this->commandTester->execute([]); $output = $this->commandTester->getDisplay(); - $this->assertContains('Auto expiration is configured', $output); + $this->assertStringContainsString('Auto expiration is configured', $output); } } diff --git a/apps/files_versions/tests/Command/ExpireVersionsTest.php b/apps/files_versions/tests/Command/ExpireVersionsTest.php index 54a52e33f07b..6a4996024338 100644 --- a/apps/files_versions/tests/Command/ExpireVersionsTest.php +++ b/apps/files_versions/tests/Command/ExpireVersionsTest.php @@ -57,6 +57,6 @@ public function testExpireNoMaxRetention() { ->willReturn(false); $this->commandTester->execute([]); $output = $this->commandTester->getDisplay(); - $this->assertContains('Auto expiration is configured', $output); + $this->assertStringContainsString('Auto expiration is configured', $output); } } diff --git a/tests/Core/Command/Apps/AppsDisableTest.php b/tests/Core/Command/Apps/AppsDisableTest.php index 6fd4a66505fb..74f63d3ad320 100644 --- a/tests/Core/Command/Apps/AppsDisableTest.php +++ b/tests/Core/Command/Apps/AppsDisableTest.php @@ -53,7 +53,7 @@ public function testCommandInput($appId, $expectedOutput) { $input = ['app-id' => $appId]; $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function providesAppIds() { diff --git a/tests/Core/Command/Apps/AppsEnableTest.php b/tests/Core/Command/Apps/AppsEnableTest.php index 3c6b6d41920b..ca24d07d90cb 100644 --- a/tests/Core/Command/Apps/AppsEnableTest.php +++ b/tests/Core/Command/Apps/AppsEnableTest.php @@ -55,7 +55,7 @@ public function testCommandInput($appId, $expectedOutput, $group = null) { } $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function providesAppIds() { diff --git a/tests/Core/Command/Apps/AppsGetPathTest.php b/tests/Core/Command/Apps/AppsGetPathTest.php index 852337e3f38c..49158d62f8b1 100644 --- a/tests/Core/Command/Apps/AppsGetPathTest.php +++ b/tests/Core/Command/Apps/AppsGetPathTest.php @@ -50,7 +50,7 @@ public function setUp(): void { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function providesAppIds() { diff --git a/tests/Core/Command/Apps/AppsListTest.php b/tests/Core/Command/Apps/AppsListTest.php index ec730ffa3f80..2d7b364088f2 100644 --- a/tests/Core/Command/Apps/AppsListTest.php +++ b/tests/Core/Command/Apps/AppsListTest.php @@ -52,7 +52,7 @@ public function setUp(): void { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function providesAppIds() { diff --git a/tests/Core/Command/Background/Queue/DeleteTest.php b/tests/Core/Command/Background/Queue/DeleteTest.php index 895e36edd638..7975583a74be 100644 --- a/tests/Core/Command/Background/Queue/DeleteTest.php +++ b/tests/Core/Command/Background/Queue/DeleteTest.php @@ -60,7 +60,7 @@ public function testCommandInput($jobId, $expectedOutput) { $input = ['Job ID' => $jobId]; $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function providesJobIds() { diff --git a/tests/Core/Command/Background/Queue/StatusTest.php b/tests/Core/Command/Background/Queue/StatusTest.php index e86af81e21bb..8f5c208e7773 100644 --- a/tests/Core/Command/Background/Queue/StatusTest.php +++ b/tests/Core/Command/Background/Queue/StatusTest.php @@ -67,7 +67,7 @@ public function testCommandInput() { +--------+------------------------------------+---------------------------+---------------+ EOS; - $this->assertContains($expected, $output); + $this->assertStringContainsString($expected, $output); } public function testJobWithArray() { @@ -88,6 +88,6 @@ public function testJobWithArray() { +--------+------------------------------------+---------------------------+-----------------------+ EOS; - $this->assertContains($expected, $output); + $this->assertStringContainsString($expected, $output); } } diff --git a/tests/Core/Command/Group/AddMemberTest.php b/tests/Core/Command/Group/AddMemberTest.php index 68c54133413f..275fbae84ea6 100644 --- a/tests/Core/Command/Group/AddMemberTest.php +++ b/tests/Core/Command/Group/AddMemberTest.php @@ -56,7 +56,7 @@ protected function setUp(): void { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function inputProvider() { diff --git a/tests/Core/Command/Group/AddTest.php b/tests/Core/Command/Group/AddTest.php index 5ff614ad26bc..2cb42046a308 100644 --- a/tests/Core/Command/Group/AddTest.php +++ b/tests/Core/Command/Group/AddTest.php @@ -51,7 +51,7 @@ protected function setUp(): void { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function inputProvider() { diff --git a/tests/Core/Command/Group/ListGroupMembersTest.php b/tests/Core/Command/Group/ListGroupMembersTest.php index aced8bc01a18..bd666f7bd9cf 100644 --- a/tests/Core/Command/Group/ListGroupMembersTest.php +++ b/tests/Core/Command/Group/ListGroupMembersTest.php @@ -56,7 +56,7 @@ protected function setUp(): void { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function inputProvider() { diff --git a/tests/Core/Command/Group/ListGroupsTest.php b/tests/Core/Command/Group/ListGroupsTest.php index f888bc466b26..24b38b7684c1 100644 --- a/tests/Core/Command/Group/ListGroupsTest.php +++ b/tests/Core/Command/Group/ListGroupsTest.php @@ -51,7 +51,7 @@ protected function setUp(): void { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function inputProvider() { diff --git a/tests/Core/Command/Group/RemoveMemberTest.php b/tests/Core/Command/Group/RemoveMemberTest.php index 882b2d0d3be3..2eb71b8abe43 100644 --- a/tests/Core/Command/Group/RemoveMemberTest.php +++ b/tests/Core/Command/Group/RemoveMemberTest.php @@ -57,7 +57,7 @@ protected function setUp(): void { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function inputProvider() { diff --git a/tests/Core/Command/Maintenance/DataFingerprintTest.php b/tests/Core/Command/Maintenance/DataFingerprintTest.php index dda2cd2af933..0467c3c7108e 100644 --- a/tests/Core/Command/Maintenance/DataFingerprintTest.php +++ b/tests/Core/Command/Maintenance/DataFingerprintTest.php @@ -84,6 +84,9 @@ public function testSetFingerPrint($expectToLog, $answer) { $this->commandTester->setInputs([$answer]); $this->commandTester->execute([]); $output = $this->commandTester->getDisplay(); - $this->assertContains("Do you want to set the data fingerprint?", $output); + $this->assertStringContainsString( + "Do you want to set the data fingerprint?", + $output + ); } } diff --git a/tests/Core/Command/Maintenance/RepairTest.php b/tests/Core/Command/Maintenance/RepairTest.php index 607c15d7953e..ef3f92f56ff0 100644 --- a/tests/Core/Command/Maintenance/RepairTest.php +++ b/tests/Core/Command/Maintenance/RepairTest.php @@ -71,7 +71,7 @@ public function testCommandInput($input, $maintenanceMode, $returnValue, $expect $result = $this->commandTester->execute($input); $this->assertEquals($result, $returnValue); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function inputProvider() { diff --git a/tests/Core/Command/System/CronTest.php b/tests/Core/Command/System/CronTest.php index e2b89cb55086..e71096015736 100644 --- a/tests/Core/Command/System/CronTest.php +++ b/tests/Core/Command/System/CronTest.php @@ -68,7 +68,10 @@ public function testMaintenanceMode() { $this->commandTester->execute([]); $output = $this->commandTester->getDisplay(); - $this->assertContains('We are in maintenance mode, skipping cron', $output); + $this->assertStringContainsString( + 'We are in maintenance mode, skipping cron', + $output + ); } public function testSingleuser() { @@ -80,7 +83,10 @@ public function testSingleuser() { $this->commandTester->execute([]); $output = $this->commandTester->getDisplay(); - $this->assertContains('We are in admin only mode, skipping cron', $output); + $this->assertStringContainsString( + 'We are in admin only mode, skipping cron', + $output + ); } public function testCronDisabled() { @@ -93,7 +99,10 @@ public function testCronDisabled() { $this->commandTester->execute([]); $output = $this->commandTester->getDisplay(); - $this->assertContains('Background Jobs are disabled!', $output); + $this->assertStringContainsString( + 'Background Jobs are disabled!', + $output + ); } public function testCronRun() { @@ -113,6 +122,9 @@ public function testCronRun() { $this->commandTester->execute(['--progress' => true]); $output = $this->commandTester->getDisplay(); - $this->assertContains('1 [->--------------------------]', $output); + $this->assertStringContainsString( + '1 [->--------------------------]', + $output + ); } } diff --git a/tests/Core/Command/TwoFactorAuth/DisableTest.php b/tests/Core/Command/TwoFactorAuth/DisableTest.php index a1b4fc87d815..ef9bce00d7c8 100644 --- a/tests/Core/Command/TwoFactorAuth/DisableTest.php +++ b/tests/Core/Command/TwoFactorAuth/DisableTest.php @@ -54,7 +54,7 @@ protected function setUp(): void { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function inputProvider() { diff --git a/tests/Core/Command/TwoFactorAuth/EnableTest.php b/tests/Core/Command/TwoFactorAuth/EnableTest.php index c0ae7bdd6f16..ecec04b26999 100644 --- a/tests/Core/Command/TwoFactorAuth/EnableTest.php +++ b/tests/Core/Command/TwoFactorAuth/EnableTest.php @@ -54,7 +54,7 @@ protected function setUp(): void { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function inputProvider() { diff --git a/tests/Core/Command/User/AddTest.php b/tests/Core/Command/User/AddTest.php index 0ae99e3cec1b..3d43f2c121dc 100644 --- a/tests/Core/Command/User/AddTest.php +++ b/tests/Core/Command/User/AddTest.php @@ -66,7 +66,7 @@ public function testCommandInput($input, $answers, $expectedOutput) { $this->commandTester->setInputs($answers); $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } /** diff --git a/tests/Core/Command/User/DeleteTest.php b/tests/Core/Command/User/DeleteTest.php index b958c870ecd6..24614cb722a4 100644 --- a/tests/Core/Command/User/DeleteTest.php +++ b/tests/Core/Command/User/DeleteTest.php @@ -88,7 +88,7 @@ public function testValidUser($deleteSuccess, $expectedOutput) { $this->commandTester->execute(['uid' => 'user']); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function testInvalidUser() { @@ -99,6 +99,9 @@ public function testInvalidUser() { $this->commandTester->execute(['uid' => 'user']); $output = $this->commandTester->getDisplay(); - $this->assertContains("User with uid 'user' does not exist", $output); + $this->assertStringContainsString( + "User with uid 'user' does not exist", + $output + ); } } diff --git a/tests/Core/Command/User/DisableTest.php b/tests/Core/Command/User/DisableTest.php index acf9b229b9a9..c0a77df60cd3 100644 --- a/tests/Core/Command/User/DisableTest.php +++ b/tests/Core/Command/User/DisableTest.php @@ -53,7 +53,7 @@ protected function setUp(): void { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function inputProvider() { diff --git a/tests/Core/Command/User/EnableTest.php b/tests/Core/Command/User/EnableTest.php index 23ab982b05f9..b96a47c79471 100644 --- a/tests/Core/Command/User/EnableTest.php +++ b/tests/Core/Command/User/EnableTest.php @@ -53,7 +53,7 @@ protected function setUp(): void { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function inputProvider() { diff --git a/tests/Core/Command/User/ListUserGroupsTest.php b/tests/Core/Command/User/ListUserGroupsTest.php index 1c98ce453261..7bc41218b4d8 100644 --- a/tests/Core/Command/User/ListUserGroupsTest.php +++ b/tests/Core/Command/User/ListUserGroupsTest.php @@ -55,7 +55,7 @@ protected function setUp(): void { public function testCommandInput($input, $expectedOutput) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } public function inputProvider() { diff --git a/tests/Core/Command/User/ListUsersTest.php b/tests/Core/Command/User/ListUsersTest.php index cbb89a799334..5e14a6d04161 100644 --- a/tests/Core/Command/User/ListUsersTest.php +++ b/tests/Core/Command/User/ListUsersTest.php @@ -56,7 +56,7 @@ public function testCommandInput($input, $expectedOutputs) { $this->commandTester->execute($input); $output = $this->commandTester->getDisplay(); foreach ($expectedOutputs as $expectedOutput) { - $this->assertContains($expectedOutput, $output); + $this->assertStringContainsString($expectedOutput, $output); } } diff --git a/tests/Settings/Controller/SettingsPageControllerTest.php b/tests/Settings/Controller/SettingsPageControllerTest.php index 2e7362f6a806..a6d0f25fb1a4 100644 --- a/tests/Settings/Controller/SettingsPageControllerTest.php +++ b/tests/Settings/Controller/SettingsPageControllerTest.php @@ -102,7 +102,7 @@ public function testGetPersonalAsUser() { $this->assertArrayHasKey('adminNav', $response->getParams()); $this->assertEmpty($response->getParams()['adminNav']); $this->assertArrayHasKey('panels', $response->getParams()); - $this->assertContains('testSectionID', $response->getParams()['personalNav'][0]['id']); + $this->assertStringContainsString('testSectionID', $response->getParams()['personalNav'][0]['id']); } public function testGetPersonalAsAdmin() { @@ -148,7 +148,7 @@ public function testGetPersonalAsAdmin() { $this->assertArrayHasKey('icon', $response->getParams()['personalNav'][0]); $this->assertArrayHasKey('link', $response->getParams()['personalNav'][0]); $this->assertArrayHasKey('id', $response->getParams()['personalNav'][0]); - $this->assertContains('testSectionID', $response->getParams()['personalNav'][0]['id']); - $this->assertContains('testAdminSectionID', $response->getParams()['adminNav'][0]['id']); + $this->assertStringContainsString('testSectionID', $response->getParams()['personalNav'][0]['id']); + $this->assertStringContainsString('testAdminSectionID', $response->getParams()['adminNav'][0]['id']); } } diff --git a/tests/Settings/Panels/Admin/AppsTest.php b/tests/Settings/Panels/Admin/AppsTest.php index 497a4f3c4a1d..175180eb9dcb 100644 --- a/tests/Settings/Panels/Admin/AppsTest.php +++ b/tests/Settings/Panels/Admin/AppsTest.php @@ -39,6 +39,6 @@ public function testGetPriority() { public function testGetPanel() { $templateHtml = $this->panel->getPanel()->fetchPage(); - $this->assertContains('
', $templateHtml); + $this->assertStringContainsString('
', $templateHtml); } } diff --git a/tests/Settings/Panels/Admin/BackgroundJobsTest.php b/tests/Settings/Panels/Admin/BackgroundJobsTest.php index 19c2776d0546..ca48c139ac4d 100644 --- a/tests/Settings/Panels/Admin/BackgroundJobsTest.php +++ b/tests/Settings/Panels/Admin/BackgroundJobsTest.php @@ -46,6 +46,6 @@ public function testGetPanel() { // Set cron to 10 mins ago, ajax mode $this->config->expects($this->exactly(2))->method('getAppValue')->willReturn(\time()-10*60, 'ajax'); $templateHtml = $this->panel->getPanel()->fetchPage(); - $this->assertContains('', $templateHtml); + $this->assertStringContainsString('', $templateHtml); } } diff --git a/tests/Settings/Panels/Admin/CertificatesTest.php b/tests/Settings/Panels/Admin/CertificatesTest.php index 7b8a9b63f9db..8489f79bba8f 100644 --- a/tests/Settings/Panels/Admin/CertificatesTest.php +++ b/tests/Settings/Panels/Admin/CertificatesTest.php @@ -64,10 +64,10 @@ public function testGetPanel() { $this->certManager->expects($this->once())->method('listCertificates')->willReturn([$mockCert]); $this->urlGenerator->expects($this->once())->method('linkToRoute'); $templateHtml = $this->panel->getPanel()->fetchPage(); - $this->assertContains('issueOrg', $templateHtml); - $this->assertContains('issuer', $templateHtml); - $this->assertContains('commonname', $templateHtml); - $this->assertContains('org', $templateHtml); + $this->assertStringContainsString('issueOrg', $templateHtml); + $this->assertStringContainsString('issuer', $templateHtml); + $this->assertStringContainsString('commonname', $templateHtml); + $this->assertStringContainsString('org', $templateHtml); } public function testGetPanelNotEnabled() { diff --git a/tests/Settings/Panels/Admin/EncryptionTest.php b/tests/Settings/Panels/Admin/EncryptionTest.php index 29ca3c33ec03..fc0a25979c2d 100644 --- a/tests/Settings/Panels/Admin/EncryptionTest.php +++ b/tests/Settings/Panels/Admin/EncryptionTest.php @@ -37,6 +37,6 @@ public function testGetPriority() { public function testGetPanel() { $templateHtml = $this->panel->getPanel()->fetchPage(); - $this->assertContains('org', $templateHtml); + $this->assertStringContainsString('org', $templateHtml); } } diff --git a/tests/Settings/Panels/Admin/FileSharingTest.php b/tests/Settings/Panels/Admin/FileSharingTest.php index 6e867d787605..d67c93a5f71c 100644 --- a/tests/Settings/Panels/Admin/FileSharingTest.php +++ b/tests/Settings/Panels/Admin/FileSharingTest.php @@ -47,6 +47,9 @@ public function testGetPriority() { public function testGetPanelEnabled() { $templateHtml = $this->panel->getPanel()->fetchPage(); - $this->assertContains('