aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-05-31 14:57:57 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2023-05-31 14:57:57 +0200
commit315f7f286fe66bae147614a2d242bdb3a321d84e (patch)
treeca2ae59f730013a479d80ee4ba5a7050d19434de /tests
parent2845a04827c457b98ef82148be16b36f5ff8dcd5 (diff)
downloadnextcloud-server-315f7f286fe66bae147614a2d242bdb3a321d84e.tar.gz
nextcloud-server-315f7f286fe66bae147614a2d242bdb3a321d84e.zip
chore: Drop app code checker test data
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests')
-rw-r--r--tests/data/app/code-checker/test-const.php10
-rw-r--r--tests/data/app/code-checker/test-deprecated-constant-alias.php8
-rw-r--r--tests/data/app/code-checker/test-deprecated-constant-sub-alias.php8
-rw-r--r--tests/data/app/code-checker/test-deprecated-constant-sub.php8
-rw-r--r--tests/data/app/code-checker/test-deprecated-constant.php6
-rw-r--r--tests/data/app/code-checker/test-deprecated-function-alias.php6
-rw-r--r--tests/data/app/code-checker/test-deprecated-function-sub-alias.php6
-rw-r--r--tests/data/app/code-checker/test-deprecated-function-sub.php6
-rw-r--r--tests/data/app/code-checker/test-deprecated-function.php4
-rw-r--r--tests/data/app/code-checker/test-deprecated-method.php5
-rw-r--r--tests/data/app/code-checker/test-deprecated-use-alias.php9
-rw-r--r--tests/data/app/code-checker/test-deprecated-use-sub-alias.php9
-rw-r--r--tests/data/app/code-checker/test-deprecated-use-sub.php9
-rw-r--r--tests/data/app/code-checker/test-deprecated-use.php9
-rw-r--r--tests/data/app/code-checker/test-equal.php11
-rw-r--r--tests/data/app/code-checker/test-extends.php8
-rw-r--r--tests/data/app/code-checker/test-identical-operator.php13
-rw-r--r--tests/data/app/code-checker/test-implements.php9
-rw-r--r--tests/data/app/code-checker/test-new.php10
-rw-r--r--tests/data/app/code-checker/test-not-equal.php11
-rw-r--r--tests/data/app/code-checker/test-static-call.php10
-rw-r--r--tests/data/app/code-checker/test-use.php12
22 files changed, 0 insertions, 187 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();
- }
-}