summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-05-22 09:54:44 +0200
committerJoas Schilling <coding@schilljs.com>2017-05-22 09:54:44 +0200
commiteebd2811dc4427443f7be964be25c3596ef7e950 (patch)
tree5181c4cb24a605554baa45e6138bf0d442223ee4 /tests
parente102923a978d83268c04a3a5bf678054a845a58e (diff)
downloadnextcloud-server-eebd2811dc4427443f7be964be25c3596ef7e950.tar.gz
nextcloud-server-eebd2811dc4427443f7be964be25c3596ef7e950.zip
Version and dependency are now required
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/apps/testapp-dependency-missing/appinfo/info.xml (renamed from tests/apps/testapp-infoxml-version-different/appinfo/info.xml)0
-rw-r--r--tests/apps/testapp-infoxml-version-different/appinfo/version1
-rw-r--r--tests/apps/testapp-infoxml-version/appinfo/info.xml9
-rw-r--r--tests/apps/testapp-infoxml-version/appinfo/version1
-rw-r--r--tests/apps/testapp-infoxml/appinfo/info.xml3
-rw-r--r--tests/apps/testapp-name-missing/appinfo/info.xml3
-rw-r--r--tests/apps/testapp-version-missing/appinfo/info.xml8
-rw-r--r--tests/apps/testapp-version/appinfo/info.xml3
-rw-r--r--tests/lib/App/CodeChecker/InfoCheckerTest.php10
9 files changed, 15 insertions, 23 deletions
diff --git a/tests/apps/testapp-infoxml-version-different/appinfo/info.xml b/tests/apps/testapp-dependency-missing/appinfo/info.xml
index c765400a76f..c765400a76f 100644
--- a/tests/apps/testapp-infoxml-version-different/appinfo/info.xml
+++ b/tests/apps/testapp-dependency-missing/appinfo/info.xml
diff --git a/tests/apps/testapp-infoxml-version-different/appinfo/version b/tests/apps/testapp-infoxml-version-different/appinfo/version
deleted file mode 100644
index e8ea05db814..00000000000
--- a/tests/apps/testapp-infoxml-version-different/appinfo/version
+++ /dev/null
@@ -1 +0,0 @@
-1.2.4
diff --git a/tests/apps/testapp-infoxml-version/appinfo/info.xml b/tests/apps/testapp-infoxml-version/appinfo/info.xml
deleted file mode 100644
index c765400a76f..00000000000
--- a/tests/apps/testapp-infoxml-version/appinfo/info.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<info>
- <id>testapp-infoxml-version</id>
- <version>1.2.3</version>
- <author>Jane</author>
- <description>A b c</description>
- <licence>Abc</licence>
- <name>Test app</name>
-</info>
diff --git a/tests/apps/testapp-infoxml-version/appinfo/version b/tests/apps/testapp-infoxml-version/appinfo/version
deleted file mode 100644
index 0495c4a88ca..00000000000
--- a/tests/apps/testapp-infoxml-version/appinfo/version
+++ /dev/null
@@ -1 +0,0 @@
-1.2.3
diff --git a/tests/apps/testapp-infoxml/appinfo/info.xml b/tests/apps/testapp-infoxml/appinfo/info.xml
index cb63a0fc76e..d4df1c3cd3f 100644
--- a/tests/apps/testapp-infoxml/appinfo/info.xml
+++ b/tests/apps/testapp-infoxml/appinfo/info.xml
@@ -6,4 +6,7 @@
<description>A b c</description>
<licence>Abc</licence>
<name>Test app</name>
+ <dependencies>
+ <nextcloud min-version="12.0" max-version="12.0"/>
+ </dependencies>
</info>
diff --git a/tests/apps/testapp-name-missing/appinfo/info.xml b/tests/apps/testapp-name-missing/appinfo/info.xml
index f0a62b8d380..591c4361899 100644
--- a/tests/apps/testapp-name-missing/appinfo/info.xml
+++ b/tests/apps/testapp-name-missing/appinfo/info.xml
@@ -5,4 +5,7 @@
<author>Jane</author>
<description>A b c</description>
<licence>Abc</licence>
+ <dependencies>
+ <nextcloud min-version="12.0" max-version="12.0"/>
+ </dependencies>
</info>
diff --git a/tests/apps/testapp-version-missing/appinfo/info.xml b/tests/apps/testapp-version-missing/appinfo/info.xml
deleted file mode 100644
index d7da3e07e36..00000000000
--- a/tests/apps/testapp-version-missing/appinfo/info.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<info>
- <id>testapp-version</id>
- <author>Jane</author>
- <description>A b c</description>
- <licence>Abc</licence>
- <name>Test app</name>
-</info>
diff --git a/tests/apps/testapp-version/appinfo/info.xml b/tests/apps/testapp-version/appinfo/info.xml
index d7da3e07e36..28e2475800f 100644
--- a/tests/apps/testapp-version/appinfo/info.xml
+++ b/tests/apps/testapp-version/appinfo/info.xml
@@ -5,4 +5,7 @@
<description>A b c</description>
<licence>Abc</licence>
<name>Test app</name>
+ <dependencies>
+ <nextcloud min-version="12.0" max-version="12.0"/>
+ </dependencies>
</info>
diff --git a/tests/lib/App/CodeChecker/InfoCheckerTest.php b/tests/lib/App/CodeChecker/InfoCheckerTest.php
index c16874fbd33..760d9880739 100644
--- a/tests/lib/App/CodeChecker/InfoCheckerTest.php
+++ b/tests/lib/App/CodeChecker/InfoCheckerTest.php
@@ -50,10 +50,12 @@ class InfoCheckerTest extends TestCase {
public function appInfoData() {
return [
['testapp-infoxml', []],
- ['testapp-version', []],
- ['testapp-infoxml-version', []],
- ['testapp-infoxml-version-different', [['type' => 'differentVersions', 'message' => 'appinfo/version: 1.2.4 - appinfo/info.xml: 1.2.3']]],
- ['testapp-version-missing', []],
+ ['testapp-version', [['type' => 'mandatoryFieldMissing', 'field' => 'version']]],
+ ['testapp-dependency-missing', [
+ ['type' => 'missingRequirement', 'field' => 'min'],
+ ['type' => 'missingRequirement', 'field' => 'max'],
+ ['type' => 'mandatoryFieldMissing', 'field' => 'dependencies'],
+ ]],
['testapp-name-missing', [['type' => 'mandatoryFieldMissing', 'field' => 'name']]],
];
}