diff --git a/.drone.star b/.drone.star index 0d11ae91de7b..cec2ff0717f8 100644 --- a/.drone.star +++ b/.drone.star @@ -26,22 +26,14 @@ config = { 'allDatabases' : { 'phpVersions': [ '7.2', - ] - }, - 'reducedDatabases' : { - 'phpVersions': [ '7.3', '7.4', - ], - 'databases': [ - 'sqlite', - 'mariadb:10.2', - ], - 'coverage': False + ] }, 'external-samba-windows' : { 'phpVersions': [ '7.2', + '7.3', '7.4', ], 'databases': [ @@ -62,6 +54,7 @@ config = { 'external-other' : { 'phpVersions': [ '7.2', + '7.3', '7.4', ], 'databases': [ @@ -76,182 +69,7 @@ config = { }, }, - 'acceptance': { - 'api': { - 'suites': [ - 'apiAuth', - 'apiAuthOcs', - 'apiAuthWebDav', - 'apiCapabilities', - 'apiComments', - 'apiFavorites', - 'apiMain', - 'apiProvisioning-v1', - 'apiProvisioning-v2', - 'apiProvisioningGroups-v1', - 'apiProvisioningGroups-v2', - 'apiShareCreateSpecial1', - 'apiShareCreateSpecial2', - 'apiSharees', - 'apiShareManagement', - 'apiShareManagementBasic', - 'apiShareOperations', - 'apiSharePublicLink1', - 'apiSharePublicLink2', - 'apiShareReshare1', - 'apiShareReshare2', - 'apiShareUpdate', - 'apiTags', - 'apiTranslation', - 'apiTrashbin', - 'apiVersions', - 'apiWebdavLocks', - 'apiWebdavLocks2', - 'apiWebdavMove1', - 'apiWebdavMove2', - 'apiWebdavOperations', - 'apiWebdavPreviews', - 'apiWebdavProperties', - 'apiWebdavUpload1', - 'apiWebdavUpload2', - ], - }, - 'apiOnOracle': { - 'suites': [ - 'apiVersions', - ], - 'filterTags': '@skip&&@issue-37026', - 'databases': ['oracle'], - }, - 'apiNotifications': { - 'suites': [ - 'apiSharingNotifications', - ], - 'extraApps': { - 'notifications': 'composer install' - }, - }, - 'apiFederation': { - 'suites': [ - 'apiFederation', - ], - 'federatedServerNeeded': True, - 'federatedServerVersions': ['daily-master-qa', 'latest', '10.3.2'] - }, - 'cli': { - 'suites': [ - 'cliBackground', - 'cliLocalStorage', - 'cliMain', - 'cliProvisioning', - 'cliTrashbin', - ], - 'emailNeeded': True, - }, - 'cliAppManagement': { - 'suites': [ - 'cliAppManagement', - ], - 'testingRemoteSystem': False - }, - 'cliExternalStorage': { - 'suites': [ - 'cliExternalStorage', - ], - 'federatedServerNeeded': True, - 'federatedServerVersions': ['daily-master-qa', 'latest', '10.3.2'] - }, - 'webUI': { - 'suites': { - 'webUIAddUsers': '', - 'webUIAdminSettings': '', - 'webUIComments': '', - 'webUICreateDelete': '', - 'webUIFavorites': '', - 'webUIFiles': '', - 'webUILogin': '', - 'webUIManageQuota': '', - 'webUIManageUsersGroups': 'webUIManageUsersGrps', - 'webUIMoveFilesFolders': 'webUIMoveFilesFolder', - 'webUIPersonalSettings': 'webUIPersonalSetting', - 'webUIRenameFiles': '', - 'webUIRenameFolders': '', - 'webUIRestrictSharing': '', - 'webUISettingsMenu': '', - 'webUISharingAcceptShares': 'webUISharingAcceptSh', - 'webUISharingAutocompletion1': 'webUISharingAutocomp1', - 'webUISharingAutocompletion2': 'webUISharingAutocomp2', - 'webUISharingInternalGroups1': 'webUISharingIntGroup1', - 'webUISharingInternalGroups2': 'webUISharingIntGroup2', - 'webUISharingInternalUsers1': 'webUISharingIntUsers1', - 'webUISharingInternalUsers2': 'webUISharingIntUsers2', - 'webUISharingPublic1': '', - 'webUISharingPublic2': '', - 'webUITags': '', - 'webUITrashbin': '', - 'webUIUpload': '', - 'webUIWebdavLockProtection': 'webUIWebdavLockProt', - 'webUIWebdavLocks': '', - }, - 'emailNeeded': True, - 'useHttps': False, - }, - 'webUINotifications': { - 'suites': { - 'webUISharingNotifications': 'webUISharingNotify', - }, - 'emailNeeded': True, - 'useHttps': False, - 'extraApps': { - 'notifications': 'composer install' - }, - }, - 'webUIFederation': { - 'suites': { - 'webUISharingExternal1': 'webUISharingExt1', - 'webUISharingExternal2': 'webUISharingExt2', - }, - 'federatedServerNeeded': True, - 'federatedServerVersions': ['daily-master-qa', 'latest', '10.3.2'] - }, - 'webUIFirefox': { - 'suites': { - 'webUIFirefoxSmoketest': 'webUIFfSmoke', - }, - 'browsers': [ - 'firefox' - ], - 'emailNeeded': True, - 'useHttps': False, - 'filterTags': '@smokeTest&&~@notifications-app-required', - 'runAllSuites': True, - 'numberOfParts': 3, - }, - 'webUIProxy': { - 'suites': { - 'webUIProxySmoketest': 'webUIProxySmoke', - }, - 'browsers': [ - 'chrome' - ], - 'emailNeeded': True, - 'proxyNeeded': True, - 'useHttps': False, - 'filterTags': '@smokeTest&&~@notifications-app-required', - 'runAllSuites': True, - 'numberOfParts': 3, - }, - 'apiProxy': { - 'suites': { - 'apiProxySmoketest': 'apiProxySmoke', - }, - 'proxyNeeded': True, - 'useHttps': False, - 'filterTags': '@smokeTest&&~@notifications-app-required', - 'runAllSuites': True, - 'numberOfParts': 5, - }, - } + 'acceptance': False } def main(ctx): diff --git a/.gitignore b/.gitignore index f9ee40a07a4a..c9d628d92ea2 100644 --- a/.gitignore +++ b/.gitignore @@ -122,6 +122,7 @@ vendor-bin/**/composer.lock # Tests - auto-generated files /data-autotest +/tests/.phpunit.result.cache /tests/coverage* /tests/karma-coverage /tests/autoconfig* diff --git a/apps/files_external/tests/Command/ListCommandTest.php b/apps/files_external/tests/Command/ListCommandTest.php index 81a830b1c3bc..6d5ff691530d 100644 --- a/apps/files_external/tests/Command/ListCommandTest.php +++ b/apps/files_external/tests/Command/ListCommandTest.php @@ -162,7 +162,7 @@ public function testShortView($options, $expectedResult, $mountOptions) { for ($i = 0; $i < $countResults; $i++) { $this->assertEquals($expectedResult[$i]['mount_id'], $results[$i]['mount_id']); $this->assertEquals($expectedResult[$i]['mount_point'], $results[$i]['mount_point']); - $this->assertContains($results[$i]['auth'], 'UserSession', true); + $this->assertStringContainsString($results[$i]['auth'], 'UserSession', true); $this->assertEquals($expectedResult[$i]['type'], $results[$i]['type']); } } else { diff --git a/apps/files_external/tests/Panels/AdminTest.php b/apps/files_external/tests/Panels/AdminTest.php index 12c87a27d387..227b8eb4c180 100644 --- a/apps/files_external/tests/Panels/AdminTest.php +++ b/apps/files_external/tests/Panels/AdminTest.php @@ -72,6 +72,6 @@ public function testGetPanel() { $this->backendService->expects($this->once())->method('getBackends')->willReturn([]); $this->backendService->expects($this->once())->method('getAvailableBackends')->willReturn([]); $templateHtml = $this->panel->getPanel()->fetchPage(); - $this->assertContains('

External Storage

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

External Storage

', $templateHtml); } } diff --git a/apps/files_external/tests/Panels/PersonalTest.php b/apps/files_external/tests/Panels/PersonalTest.php index 2414de1f328c..2e5398dedc05 100644 --- a/apps/files_external/tests/Panels/PersonalTest.php +++ b/apps/files_external/tests/Panels/PersonalTest.php @@ -72,6 +72,6 @@ public function testGetPanel() { $this->backendService->expects($this->once())->method('getBackends')->willReturn([]); $this->backendService->expects($this->once())->method('getAvailableBackends')->willReturn([]); $templateHtml = $this->panel->getPanel()->fetchPage(); - $this->assertContains('

External Storage

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

External Storage

', $templateHtml); } } diff --git a/apps/files_trashbin/tests/ExpirationTest.php b/apps/files_trashbin/tests/ExpirationTest.php index bd89c0834de6..be707993ff46 100644 --- a/apps/files_trashbin/tests/ExpirationTest.php +++ b/apps/files_trashbin/tests/ExpirationTest.php @@ -138,9 +138,16 @@ public function testParseRetentionObligation($configValue, $expectedMinAge, $exp ); $expiration = new Expiration($mockedConfig, $mockedTimeFactory); - $this->assertAttributeEquals($expectedMinAge, 'minAge', $expiration); - $this->assertAttributeEquals($expectedMaxAge, 'maxAge', $expiration); - $this->assertAttributeEquals($expectedCanPurgeToSaveSpace, 'canPurgeToSaveSpace', $expiration); + $expirationInternals = (array) $expiration; + $expectedKey = "\0OCA\\Files_Trashbin\\Expiration\0minAge"; + $this->assertArrayHasKey($expectedKey, $expirationInternals); + $this->assertEquals($expectedMinAge, $expirationInternals[$expectedKey]); + $expectedKey = "\0OCA\\Files_Trashbin\\Expiration\0maxAge"; + $this->assertArrayHasKey($expectedKey, $expirationInternals); + $this->assertEquals($expectedMaxAge, $expirationInternals[$expectedKey]); + $expectedKey = "\0OCA\\Files_Trashbin\\Expiration\0canPurgeToSaveSpace"; + $this->assertArrayHasKey($expectedKey, $expirationInternals); + $this->assertEquals($expectedCanPurgeToSaveSpace, $expirationInternals[$expectedKey]); } public function timestampTestData() { diff --git a/apps/files_versions/tests/ExpirationTest.php b/apps/files_versions/tests/ExpirationTest.php index 0ed18f3857c6..aa43029e41cb 100644 --- a/apps/files_versions/tests/ExpirationTest.php +++ b/apps/files_versions/tests/ExpirationTest.php @@ -140,9 +140,16 @@ public function testParseRetentionObligation($configValue, $expectedMinAge, $exp ); $expiration = new Expiration($mockedConfig, $mockedTimeFactory); - $this->assertAttributeEquals($expectedMinAge, 'minAge', $expiration); - $this->assertAttributeEquals($expectedMaxAge, 'maxAge', $expiration); - $this->assertAttributeEquals($expectedCanPurgeToSaveSpace, 'canPurgeToSaveSpace', $expiration); + $expirationInternals = (array) $expiration; + $expectedKey = "\0OCA\\Files_Versions\\Expiration\0minAge"; + $this->assertArrayHasKey($expectedKey, $expirationInternals); + $this->assertEquals($expectedMinAge, $expirationInternals[$expectedKey]); + $expectedKey = "\0OCA\\Files_Versions\\Expiration\0maxAge"; + $this->assertArrayHasKey($expectedKey, $expirationInternals); + $this->assertEquals($expectedMaxAge, $expirationInternals[$expectedKey]); + $expectedKey = "\0OCA\\Files_Versions\\Expiration\0canPurgeToSaveSpace"; + $this->assertArrayHasKey($expectedKey, $expirationInternals); + $this->assertEquals($expectedCanPurgeToSaveSpace, $expirationInternals[$expectedKey]); } /** diff --git a/composer.json b/composer.json index 7c877fc5f7fb..bee87ebcd740 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "bamarni/composer-bin-plugin": "^1.4", "jakub-onderka/php-console-highlighter": "^0.4", "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "^7.5", + "phpunit/phpunit": "^8.5", "roave/security-advisories": "dev-master" }, "require": { diff --git a/composer.lock b/composer.lock index 2e6498e08b11..841eceee76a2 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5b401844dfa873864dfbd3f272c09c1d", + "content-hash": "f534d10686de81bc735d9542fc9fddda", "packages": [ { "name": "bantu/ini-get-wrapper", @@ -2743,6 +2743,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-30T11:41:10+00:00" }, { @@ -2813,6 +2827,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-27T16:54:36+00:00" }, { @@ -2930,6 +2958,20 @@ "portable", "shim" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-09T19:04:49+00:00" }, { @@ -2992,6 +3034,20 @@ "portable", "shim" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-09T19:04:49+00:00" }, { @@ -3051,6 +3107,20 @@ "portable", "shim" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-09T19:04:49+00:00" }, { @@ -3106,6 +3176,20 @@ "portable", "shim" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-02-27T09:26:54+00:00" }, { @@ -3164,6 +3248,20 @@ "portable", "shim" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-02-27T09:26:54+00:00" }, { @@ -3213,6 +3311,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-27T16:54:36+00:00" }, { @@ -3289,6 +3401,20 @@ "uri", "url" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-30T11:41:10+00:00" }, { @@ -3423,6 +3549,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-03-27T16:54:36+00:00" }, { @@ -4088,40 +4228,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": { @@ -4147,7 +4287,7 @@ "testing", "xunit" ], - "time": "2018-10-31T16:06:48+00:00" + "time": "2019-11-20T13:55:58+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4340,53 +4480,52 @@ }, { "name": "phpunit/phpunit", - "version": "7.5.20", + "version": "8.5.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" + "reference": "8474e22d7d642f665084ba5ec780626cbd1efd23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8474e22d7d642f665084ba5ec780626cbd1efd23", + "reference": "8474e22d7d642f665084ba5ec780626cbd1efd23", "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" @@ -4394,7 +4533,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "8.5-dev" } }, "autoload": { @@ -4420,7 +4559,17 @@ "testing", "xunit" ], - "time": "2020-01-08T08:45:45+00:00" + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-04-23T04:39:42+00:00" }, { "name": "roave/security-advisories", @@ -4428,12 +4577,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "09afa996c68c18f49e6487b06adcb2ef27da61fa" + "reference": "81541a731da2f245a08666de73169cb5da7ac573" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/09afa996c68c18f49e6487b06adcb2ef27da61fa", - "reference": "09afa996c68c18f49e6487b06adcb2ef27da61fa", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/81541a731da2f245a08666de73169cb5da7ac573", + "reference": "81541a731da2f245a08666de73169cb5da7ac573", "shasum": "" }, "conflict": { @@ -4479,6 +4628,8 @@ "endroid/qr-code-bundle": "<3.4.2", "enshrined/svg-sanitize": "<0.13.1", "erusev/parsedown": "<1.7.2", + "ezsystems/demobundle": ">=5.4,<5.4.6.1", + "ezsystems/ezdemo-ls-extension": ">=5.4,<5.4.2.1", "ezsystems/ezfind-ls": ">=5.3,<5.3.6.1|>=5.4,<5.4.11.1|>=2017.12,<2017.12.0.1", "ezsystems/ezplatform": ">=1.7,<1.7.9.1|>=1.13,<1.13.5.1|>=2.5,<2.5.4", "ezsystems/ezplatform-admin-ui": ">=1.3,<1.3.5|>=1.4,<1.4.6", @@ -4567,7 +4718,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.4", + "simplesamlphp/simplesamlphp": "<1.18.6", "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", "simplito/elliptic-php": "<1.0.6", "slim/slim": "<2.6", @@ -4684,7 +4835,17 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2020-04-15T04:56:51+00:00" + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/roave/security-advisories", + "type": "tidelift" + } + ], + "time": "2020-04-23T00:01:30+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4973,23 +5134,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": "*" @@ -4997,7 +5161,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -5020,7 +5184,7 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2019-02-01T05:30:01+00:00" }, { "name": "sebastian/object-enumerator", @@ -5209,6 +5373,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", @@ -5308,6 +5518,20 @@ "polyfill", "portable" ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], "time": "2020-02-27T09:26:54+00:00" }, { @@ -5413,5 +5637,6 @@ "platform-dev": [], "platform-overrides": { "php": "7.2" - } + }, + "plugin-api-version": "1.1.0" } diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index 088e262a9901..85f5f11c5a91 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -82,6 +82,9 @@ abstract class Common implements Storage, ILockingStorage, IVersionedStorage, IP protected $mountOptions = []; protected $owner = null; + public function __construct($parameters) { + } + /** * Remove a file or folder * diff --git a/tests/lib/Http/Client/WebDavClientServiceTest.php b/tests/lib/Http/Client/WebDavClientServiceTest.php index fb14196f2e9d..97c59d5ac81c 100644 --- a/tests/lib/Http/Client/WebDavClientServiceTest.php +++ b/tests/lib/Http/Client/WebDavClientServiceTest.php @@ -91,7 +91,12 @@ public function testNewClientWithProxy() { $this->assertInstanceOf(Client::class, $client); - $curlSettings = $this->readAttribute($client, 'curlSettings'); + $clientInternals = (array) $client; + // protected object properties like curlSettings have "\0*\0" prepended + $expectedKey = "\0*\0curlSettings"; + $this->assertArrayHasKey($expectedKey, $clientInternals); + $curlSettings = $clientInternals[$expectedKey]; + $this->assertArrayHasKey(CURLOPT_PROXY, $curlSettings); $this->assertEquals('proxyhost', $curlSettings[CURLOPT_PROXY]); } @@ -124,7 +129,12 @@ public function testNewClientWithProxyAndAuth() { $this->assertInstanceOf(Client::class, $client); - $curlSettings = $this->readAttribute($client, 'curlSettings'); + $clientInternals = (array) $client; + // protected object properties like curlSettings have "\0*\0" prepended + $expectedKey = "\0*\0curlSettings"; + $this->assertArrayHasKey($expectedKey, $clientInternals); + $curlSettings = $clientInternals[$expectedKey]; + $this->assertArrayHasKey(CURLOPT_PROXY, $curlSettings); $this->assertEquals('user:password@proxyhost', $curlSettings[CURLOPT_PROXY]); } diff --git a/tests/lib/SystemConfigTest.php b/tests/lib/SystemConfigTest.php index 823e99a8a9d8..98033fa359af 100644 --- a/tests/lib/SystemConfigTest.php +++ b/tests/lib/SystemConfigTest.php @@ -134,7 +134,11 @@ public function testSetValue() { $systemConfig->setValue('dbtype', 'otherDb'); $expectedConfig = $this->initialConfig; $expectedConfig['dbtype'] = 'otherDb'; - $this->assertAttributeEquals($expectedConfig, 'cache', $this->config); + $configInternals = (array) $this->config; + $expectedKey = "\0*\0cache"; + $this->assertArrayHasKey($expectedKey, $configInternals); + $cache = $configInternals[$expectedKey]; + $this->assertEquals($expectedConfig, $cache); } public function testSetValues() { @@ -148,7 +152,11 @@ public function testSetValues() { 'not_exists' => null, ]); - $this->assertAttributeEquals($this->initialConfig, 'cache', $this->config); + $configInternals = (array) $this->config; + $expectedKey = "\0*\0cache"; + $this->assertArrayHasKey($expectedKey, $configInternals); + $cache = $configInternals[$expectedKey]; + $this->assertEquals($this->initialConfig, $cache); $this->assertStringEqualsFile($this->configFile, self::TESTCONTENT); $systemConfig->setValues([ @@ -158,7 +166,11 @@ public function testSetValues() { $expectedConfig = $this->initialConfig; $expectedConfig['dbtype'] = 'otherDb'; unset($expectedConfig['license-key']); - $this->assertAttributeEquals($expectedConfig, 'cache', $this->config); + $configInternals = (array) $this->config; + $expectedKey = "\0*\0cache"; + $this->assertArrayHasKey($expectedKey, $configInternals); + $cache = $configInternals[$expectedKey]; + $this->assertEquals($expectedConfig, $cache); } public function dataGetValue() { @@ -294,7 +306,11 @@ public function testDeleteValue() { $systemConfig->deleteValue('dbtype'); $expectedConfig = $this->initialConfig; unset($expectedConfig['dbtype']); - $this->assertAttributeEquals($expectedConfig, 'cache', $this->config); + $configInternals = (array) $this->config; + $expectedKey = "\0*\0cache"; + $this->assertArrayHasKey($expectedKey, $configInternals); + $cache = $configInternals[$expectedKey]; + $this->assertEquals($expectedConfig, $cache); } public function testIsReadOnly() { diff --git a/tests/lib/Template/ResourceLocatorTest.php b/tests/lib/Template/ResourceLocatorTest.php index 1101dad4cf37..913d7f3d8375 100644 --- a/tests/lib/Template/ResourceLocatorTest.php +++ b/tests/lib/Template/ResourceLocatorTest.php @@ -57,11 +57,22 @@ public function getResourceLocator($theme, $core_map, $appsRoots) { public function testConstructor() { $locator = $this->getResourceLocator('theme', ['core'=>'map'], ['foo'=>'bar']); - $this->assertAttributeInstanceOf('OC\Theme\Theme', 'theme', $locator); - $this->assertAttributeEquals('core', 'serverroot', $locator); - $this->assertAttributeEquals(['core'=>'map'], 'mapping', $locator); - $this->assertAttributeEquals('map', 'webroot', $locator); - $this->assertAttributeEquals([], 'resources', $locator); + $locatorInternals = (array) $locator; + $expectedKey = "\0*\0theme"; + $this->assertArrayHasKey($expectedKey, $locatorInternals); + $this->assertInstanceOf('OC\Theme\Theme', $locatorInternals[$expectedKey]); + $expectedKey = "\0*\0serverroot"; + $this->assertArrayHasKey($expectedKey, $locatorInternals); + $this->assertEquals('core', $locatorInternals[$expectedKey]); + $expectedKey = "\0*\0mapping"; + $this->assertArrayHasKey($expectedKey, $locatorInternals); + $this->assertEquals(['core'=>'map'], $locatorInternals[$expectedKey]); + $expectedKey = "\0*\0webroot"; + $this->assertArrayHasKey($expectedKey, $locatorInternals); + $this->assertEquals('map', $locatorInternals[$expectedKey]); + $expectedKey = "\0*\0resources"; + $this->assertArrayHasKey($expectedKey, $locatorInternals); + $this->assertEquals([], $locatorInternals[$expectedKey]); } public function testFind() {