diff options
Diffstat (limited to 'tests/data/app')
37 files changed, 121 insertions, 193 deletions
diff --git a/tests/data/app/code-checker/test-const.php b/tests/data/app/code-checker/test-const.php deleted file mode 100644 index 7ea3bd6c870..00000000000 --- a/tests/data/app/code-checker/test-const.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -/** - * Class BadClass - accessing consts on blacklisted classes is not allowed - */ -class BadClass { - public function foo() { - $bar = \OC_API::ADMIN_AUTH; - } -} diff --git a/tests/data/app/code-checker/test-deprecated-constant-alias.php b/tests/data/app/code-checker/test-deprecated-constant-alias.php deleted file mode 100644 index b5a5bfdb762..00000000000 --- a/tests/data/app/code-checker/test-deprecated-constant-alias.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -use OCP\NamespaceName\ClassName as Alias; - -/** - * Class BadClass - creating an instance of a blacklisted class is not allowed - */ -Alias::CONSTANT_NAME; diff --git a/tests/data/app/code-checker/test-deprecated-constant-sub-alias.php b/tests/data/app/code-checker/test-deprecated-constant-sub-alias.php deleted file mode 100644 index 9b1757aa683..00000000000 --- a/tests/data/app/code-checker/test-deprecated-constant-sub-alias.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -use OCP\NamespaceName as SubAlias; - -/** - * Class BadClass - creating an instance of a blacklisted class is not allowed - */ -SubAlias\ClassName::CONSTANT_NAME; diff --git a/tests/data/app/code-checker/test-deprecated-constant-sub.php b/tests/data/app/code-checker/test-deprecated-constant-sub.php deleted file mode 100644 index 86e0ff52efe..00000000000 --- a/tests/data/app/code-checker/test-deprecated-constant-sub.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -use OCP\NamespaceName; - -/** - * Class BadClass - creating an instance of a blacklisted class is not allowed - */ -NamespaceName\ClassName::CONSTANT_NAME; diff --git a/tests/data/app/code-checker/test-deprecated-constant.php b/tests/data/app/code-checker/test-deprecated-constant.php deleted file mode 100644 index 170b1d9e5ad..00000000000 --- a/tests/data/app/code-checker/test-deprecated-constant.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php - -/** - * Class BadClass - creating an instance of a blacklisted class is not allowed - */ -\OCP\NamespaceName\ClassName::CONSTANT_NAME; diff --git a/tests/data/app/code-checker/test-deprecated-function-alias.php b/tests/data/app/code-checker/test-deprecated-function-alias.php deleted file mode 100644 index 28ed5051191..00000000000 --- a/tests/data/app/code-checker/test-deprecated-function-alias.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php - -use OCP\NamespaceName\ClassName as Alias; - -Alias::functionName(); -Alias::methodName(); diff --git a/tests/data/app/code-checker/test-deprecated-function-sub-alias.php b/tests/data/app/code-checker/test-deprecated-function-sub-alias.php deleted file mode 100644 index 73dd5814531..00000000000 --- a/tests/data/app/code-checker/test-deprecated-function-sub-alias.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php - -use OCP\NamespaceName as SubAlias; - -SubAlias\ClassName::functionName(); -SubAlias\ClassName::methodName(); diff --git a/tests/data/app/code-checker/test-deprecated-function-sub.php b/tests/data/app/code-checker/test-deprecated-function-sub.php deleted file mode 100644 index c08d3bad8c0..00000000000 --- a/tests/data/app/code-checker/test-deprecated-function-sub.php +++ /dev/null @@ -1,6 +0,0 @@ -<?php - -use OCP\NamespaceName; - -NamespaceName\ClassName::functionName(); -NamespaceName\ClassName::methodName(); diff --git a/tests/data/app/code-checker/test-deprecated-function.php b/tests/data/app/code-checker/test-deprecated-function.php deleted file mode 100644 index 12a144a7118..00000000000 --- a/tests/data/app/code-checker/test-deprecated-function.php +++ /dev/null @@ -1,4 +0,0 @@ -<?php - -\OCP\NamespaceName\ClassName::functionName(); -\OCP\NamespaceName\ClassName::methodName(); diff --git a/tests/data/app/code-checker/test-deprecated-method.php b/tests/data/app/code-checker/test-deprecated-method.php deleted file mode 100644 index ee2fdb642d4..00000000000 --- a/tests/data/app/code-checker/test-deprecated-method.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php - -$class = new \OCP\NamespaceName\ClassName(); -$class->methodName(); -$class::methodName(); diff --git a/tests/data/app/code-checker/test-deprecated-use-alias.php b/tests/data/app/code-checker/test-deprecated-use-alias.php deleted file mode 100644 index a92187fa880..00000000000 --- a/tests/data/app/code-checker/test-deprecated-use-alias.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -use OCP\AppFramework\IApi as OAFIA; - -/** - * Class BadClass - creating an instance of a blacklisted class is not allowed - */ -class BadClass implements OAFIA { -} diff --git a/tests/data/app/code-checker/test-deprecated-use-sub-alias.php b/tests/data/app/code-checker/test-deprecated-use-sub-alias.php deleted file mode 100644 index 9da4b75d216..00000000000 --- a/tests/data/app/code-checker/test-deprecated-use-sub-alias.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -use OCP\AppFramework as OAF; - -/** - * Class BadClass - creating an instance of a blacklisted class is not allowed - */ -class BadClass implements OAF\IApi { -} diff --git a/tests/data/app/code-checker/test-deprecated-use-sub.php b/tests/data/app/code-checker/test-deprecated-use-sub.php deleted file mode 100644 index a53e9a7229e..00000000000 --- a/tests/data/app/code-checker/test-deprecated-use-sub.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -use OCP\AppFramework; - -/** - * Class BadClass - creating an instance of a blacklisted class is not allowed - */ -class BadClass implements AppFramework\IApi { -} diff --git a/tests/data/app/code-checker/test-deprecated-use.php b/tests/data/app/code-checker/test-deprecated-use.php deleted file mode 100644 index ebf2c90bc5a..00000000000 --- a/tests/data/app/code-checker/test-deprecated-use.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -use OCP\AppFramework\IApi; - -/** - * Class BadClass - creating an instance of a blacklisted class is not allowed - */ -class BadClass implements IApi { -} diff --git a/tests/data/app/code-checker/test-equal.php b/tests/data/app/code-checker/test-equal.php deleted file mode 100644 index 90543ba7258..00000000000 --- a/tests/data/app/code-checker/test-equal.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * Class BadClass - uses equal instead of identical operator - */ -class BadClass { - public function foo() { - if (true == false) { - } - } -} diff --git a/tests/data/app/code-checker/test-extends.php b/tests/data/app/code-checker/test-extends.php deleted file mode 100644 index 39d29da92dc..00000000000 --- a/tests/data/app/code-checker/test-extends.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -/** - * Class BadClass - sub class a forbidden class is not allowed - */ -class BadClass extends OC_Hook { - -} diff --git a/tests/data/app/code-checker/test-identical-operator.php b/tests/data/app/code-checker/test-identical-operator.php deleted file mode 100644 index 4c7641ede89..00000000000 --- a/tests/data/app/code-checker/test-identical-operator.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php - -/** - * Class GoodClass - uses identical operator - */ -class GoodClass { - public function foo() { - if (true === false) { - } - if (true !== false) { - } - } -} diff --git a/tests/data/app/code-checker/test-implements.php b/tests/data/app/code-checker/test-implements.php deleted file mode 100644 index 3bf2f959b52..00000000000 --- a/tests/data/app/code-checker/test-implements.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php - -/** - * Class BadClass - sub class a forbidden class is not allowed - * NOTE: lowercase typo is intended - */ -class BadClass implements oC_Avatar { - -} diff --git a/tests/data/app/code-checker/test-new.php b/tests/data/app/code-checker/test-new.php deleted file mode 100644 index 0522d473d96..00000000000 --- a/tests/data/app/code-checker/test-new.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -/** - * Class BadClass - creating an instance of a blacklisted class is not allowed - */ -class BadClass { - public function foo() { - $bar = new OC_AppConfig(); - } -} diff --git a/tests/data/app/code-checker/test-not-equal.php b/tests/data/app/code-checker/test-not-equal.php deleted file mode 100644 index d9a8d1c25c6..00000000000 --- a/tests/data/app/code-checker/test-not-equal.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php - -/** - * Class BadClass - uses equal instead of identical operator - */ -class BadClass { - public function foo() { - if (true != false) { - } - } -} diff --git a/tests/data/app/code-checker/test-static-call.php b/tests/data/app/code-checker/test-static-call.php deleted file mode 100644 index 4afe0b1174d..00000000000 --- a/tests/data/app/code-checker/test-static-call.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -/** - * Class BadClass - calling static methods on blacklisted classes is not allowed - */ -class BadClass { - public function foo() { - OC_App::isEnabled('bar'); - } -} diff --git a/tests/data/app/code-checker/test-use.php b/tests/data/app/code-checker/test-use.php deleted file mode 100644 index 9c4824f9767..00000000000 --- a/tests/data/app/code-checker/test-use.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - -use OC_AppConfig as UseConfig; - -/** - * Class BadClass - creating an instance of a blacklisted class is not allowed - */ -class BadClass { - public function foo() { - $bar = new UseConfig(); - } -} diff --git a/tests/data/app/description-multi-lang.xml b/tests/data/app/description-multi-lang.xml index e7eee3bcb8b..be1dd616a99 100644 --- a/tests/data/app/description-multi-lang.xml +++ b/tests/data/app/description-multi-lang.xml @@ -1,4 +1,8 @@ <?xml version="1.0"?> +<!-- + - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors + - SPDX-License-Identifier: AGPL-3.0-or-later +--> <info> <id>files_encryption</id> <name>Server-side Encryption</name> diff --git a/tests/data/app/description-single-lang.xml b/tests/data/app/description-single-lang.xml index 5fb1ba07e8e..36fb2aacbe2 100644 --- a/tests/data/app/description-single-lang.xml +++ b/tests/data/app/description-single-lang.xml @@ -1,4 +1,8 @@ <?xml version="1.0"?> +<!-- + - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors + - SPDX-License-Identifier: AGPL-3.0-or-later +--> <info> <id>files_encryption</id> <name>Server-side Encryption</name> diff --git a/tests/data/app/expected-info.json b/tests/data/app/expected-info.json index 8527f18a2c0..40ba6104104 100644 --- a/tests/data/app/expected-info.json +++ b/tests/data/app/expected-info.json @@ -6,7 +6,9 @@ "name": "Server-side Encryption", "description": "\n\tThis application encrypts all files accessed by ownCloud at rest, wherever they are stored. As an example, with this application enabled, external cloud based Amazon S3 storage will be encrypted, protecting this data on storage outside of the control of the Admin. When this application is enabled for the first time, all files are encrypted as users log in and are prompted for their password. The recommended recovery key option enables recovery of files in case the key is lost. \n\tNote that this app encrypts all files that are touched by ownCloud, so external storage providers and applications such as SharePoint will see new files encrypted when they are accessed. Encryption is based on AES 128 or 256 bit keys. More information is available in the Encryption documentation \n\t", "licence": "AGPL", - "author": "Sam Tuke, Bjoern Schiessle, Florin Peter", + "author": [ + "Sam Tuke, Bjoern Schiessle, Florin Peter" + ], "requiremin": "4", "shipped": "true", "documentation": { @@ -65,7 +67,10 @@ "min-version": "7.0.1", "max-version": "8" } - } + }, + "backend": [ + "caldav" + ] }, "repair-steps": { "install": [], diff --git a/tests/data/app/expected-info.json.license b/tests/data/app/expected-info.json.license new file mode 100644 index 00000000000..328cbf7b249 --- /dev/null +++ b/tests/data/app/expected-info.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors +SPDX-FileCopyrightText: 2016 ownCloud, Inc. +SPDX-License-Identifier: AGPL-3.0-only diff --git a/tests/data/app/invalid-info.xml b/tests/data/app/invalid-info.xml index 0ddb13b89c0..1c39ae2d625 100644 --- a/tests/data/app/invalid-info.xml +++ b/tests/data/app/invalid-info.xml @@ -1,4 +1,9 @@ <?xml version="1.0"?> +<!-- + - SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + - SPDX-FileCopyrightText: 2014 ownCloud, Inc. + - SPDX-License-Identifier: AGPL-3.0-only +--> <info <id>files_encryption</id> <name>Server-side Encryption</name> diff --git a/tests/data/app/navigation-one-item.json b/tests/data/app/navigation-one-item.json index c9002da6b0d..2bd81461586 100644 --- a/tests/data/app/navigation-one-item.json +++ b/tests/data/app/navigation-one-item.json @@ -29,7 +29,8 @@ "min-version": "16", "max-version": "16" } - } + }, + "backend": [] }, "background-jobs": [ "OCA\\Activity\\BackgroundJob\\EmailNotification", @@ -82,4 +83,4 @@ "uninstall": [] }, "two-factor-providers": [] -}
\ No newline at end of file +} diff --git a/tests/data/app/navigation-one-item.json.license b/tests/data/app/navigation-one-item.json.license new file mode 100644 index 00000000000..cbd71b0f672 --- /dev/null +++ b/tests/data/app/navigation-one-item.json.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors +SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/data/app/navigation-one-item.xml b/tests/data/app/navigation-one-item.xml index a03e5c8ffbf..cb0bd5f2929 100644 --- a/tests/data/app/navigation-one-item.xml +++ b/tests/data/app/navigation-one-item.xml @@ -1,4 +1,8 @@ <?xml version="1.0"?> +<!-- + - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + - SPDX-License-Identifier: AGPL-3.0-or-later +--> <info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> <id>activity</id> diff --git a/tests/data/app/navigation-two-items.json b/tests/data/app/navigation-two-items.json index a7579217238..4b081d3bbd9 100644 --- a/tests/data/app/navigation-two-items.json +++ b/tests/data/app/navigation-two-items.json @@ -29,7 +29,8 @@ "min-version": "16", "max-version": "16" } - } + }, + "backend": [] }, "background-jobs": [ "OCA\\Activity\\BackgroundJob\\EmailNotification", @@ -88,4 +89,4 @@ "uninstall": [] }, "two-factor-providers": [] -}
\ No newline at end of file +} diff --git a/tests/data/app/navigation-two-items.json.license b/tests/data/app/navigation-two-items.json.license new file mode 100644 index 00000000000..cbd71b0f672 --- /dev/null +++ b/tests/data/app/navigation-two-items.json.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors +SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/data/app/navigation-two-items.xml b/tests/data/app/navigation-two-items.xml index fba60a2871d..153e12e6511 100644 --- a/tests/data/app/navigation-two-items.xml +++ b/tests/data/app/navigation-two-items.xml @@ -1,4 +1,8 @@ <?xml version="1.0"?> +<!-- + - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + - SPDX-License-Identifier: AGPL-3.0-or-later +--> <info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> <id>activity</id> diff --git a/tests/data/app/valid-info.xml b/tests/data/app/valid-info.xml index 4788d046c13..d2569788399 100644 --- a/tests/data/app/valid-info.xml +++ b/tests/data/app/valid-info.xml @@ -1,4 +1,9 @@ <?xml version="1.0"?> +<!-- + - SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + - SPDX-FileCopyrightText: 2014 ownCloud, Inc. + - SPDX-License-Identifier: AGPL-3.0-only +--> <info> <id>files_encryption</id> <name>Server-side Encryption</name> @@ -29,5 +34,6 @@ <lib>curl</lib> <os>Linux</os> <owncloud min-version="7.0.1" max-version="8" /> + <backend>caldav</backend> </dependencies> </info> diff --git a/tests/data/app/various-single-item.json b/tests/data/app/various-single-item.json new file mode 100644 index 00000000000..ae5e751ab49 --- /dev/null +++ b/tests/data/app/various-single-item.json @@ -0,0 +1,50 @@ +{ + "id": "notifications", + "name": "Notifications", + "description": "A single screenshot should be an array", + "version": "1.0.0", + "licence": "agpl", + "author": [ + "Joas Schilling" + ], + "dependencies": { + "nextcloud": { + "@attributes": { + "min-version": "16", + "max-version": "16" + } + }, + "backend": [] + }, + "screenshot": [ + "https://raw.githubusercontent.com/nextcloud/notifications/refs/heads/master/docs/screenshot.png" + ], + "category": [ + "monitoring" + ], + "info": [], + "background-jobs": [], + "activity": { + "filters": [], + "settings": [], + "providers": [] + }, + "commands": [], + "remote": [], + "public": [], + "repair-steps": { + "install": [], + "pre-migration": [], + "post-migration": [], + "live-migration": [], + "uninstall": [] + }, + "settings": { + "admin": [], + "admin-section": [], + "personal": [], + "personal-section": [] + }, + "two-factor-providers": [], + "types": [] +} diff --git a/tests/data/app/various-single-item.json.license b/tests/data/app/various-single-item.json.license new file mode 100644 index 00000000000..84f7e70446e --- /dev/null +++ b/tests/data/app/various-single-item.json.license @@ -0,0 +1,2 @@ +SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors +SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/tests/data/app/various-single-item.xml b/tests/data/app/various-single-item.xml new file mode 100644 index 00000000000..cb9595516e1 --- /dev/null +++ b/tests/data/app/various-single-item.xml @@ -0,0 +1,22 @@ +<?xml version="1.0"?> +<!-- + - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + - SPDX-License-Identifier: AGPL-3.0-or-later +--> +<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> + <id>notifications</id> + <name>Notifications</name> + <description>A single screenshot should be an array</description> + <version>1.0.0</version> + <licence>agpl</licence> + <author>Joas Schilling</author> + + <category>monitoring</category> + + <screenshot>https://raw.githubusercontent.com/nextcloud/notifications/refs/heads/master/docs/screenshot.png</screenshot> + + <dependencies> + <nextcloud min-version="16" max-version="16"/> + </dependencies> +</info> |