Skip to content

Commit e3044a3

Browse files
committed
test(appinfo): add test cases for list parsing of appinfo
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 70e1607 commit e3044a3

14 files changed

Lines changed: 1121 additions & 9 deletions
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
{
2+
"id": "attributes_once",
3+
"name": {
4+
"@attributes": {
5+
"lang": "en"
6+
},
7+
"@value": "Attributes Once"
8+
},
9+
"summary": {
10+
"@attributes": {
11+
"lang": "en"
12+
},
13+
"@value": "Single occurrence with attributes set on allowed elements."
14+
},
15+
"description": {
16+
"@attributes": {
17+
"lang": "en"
18+
},
19+
"@value": "Fixture that sets attributes where allowed (e.g., lang, type, min-version, for)."
20+
},
21+
"version": "1.2.3",
22+
"licence": "agpl",
23+
"author": {
24+
"@attributes": {
25+
"homepage": "http://example.com",
26+
"mail": "jane@example.com"
27+
},
28+
"@value": "Jane Doe"
29+
},
30+
"types": [
31+
"filesystem"
32+
],
33+
"documentation": {
34+
"user": "https://example.test/attributes-once/user"
35+
},
36+
"category": [
37+
"tools"
38+
],
39+
"website": "https://example.test/attributes-once",
40+
"bugs": "https://example.com/issues",
41+
"repository": {
42+
"@attributes": {
43+
"type": "git"
44+
},
45+
"@value": "https://example.test/attributes-once.git"
46+
},
47+
"screenshot": {
48+
"@attributes": {
49+
"small-thumbnail": "https://example.test/attributes-once-small.png"
50+
},
51+
"@value": "https://example.test/attributes-once.png"
52+
},
53+
"dependencies": {
54+
"php": {
55+
"@attributes": {
56+
"min-version": "8.2"
57+
}
58+
},
59+
"database": {
60+
"@attributes": {
61+
"min-version": "2.0"
62+
},
63+
"@value": "pgsql"
64+
},
65+
"lib": {
66+
"@attributes": {
67+
"min-version": "1.5"
68+
},
69+
"@value": "curl"
70+
},
71+
"owncloud": {
72+
"@attributes": {
73+
"min-version": "1.0",
74+
"max-version": "2.0"
75+
}
76+
},
77+
"nextcloud": {
78+
"@attributes": {
79+
"min-version": "30.0",
80+
"max-version": "31.0"
81+
}
82+
},
83+
"backend": [
84+
"caldav"
85+
]
86+
},
87+
"background-jobs": {
88+
"job": "OCA\\AttributesOnce\\BackgroundJob\\Job"
89+
},
90+
"repair-steps": {
91+
"install": {
92+
"step": "OCA\\AttributesOnce\\RepairStep\\Install"
93+
},
94+
"pre-migration": [],
95+
"post-migration": [],
96+
"live-migration": [],
97+
"uninstall": []
98+
},
99+
"commands": {
100+
"command": "OCA\\AttributesOnce\\Command\\Run"
101+
},
102+
"settings": {
103+
"admin": [
104+
"OCA\\AttributesOnce\\Settings\\Admin"
105+
],
106+
"admin-section": [],
107+
"personal": [],
108+
"personal-section": []
109+
},
110+
"activity": {
111+
"providers": {
112+
"provider": "OCA\\AttributesOnce\\Activity\\Provider"
113+
},
114+
"filters": [],
115+
"settings": []
116+
},
117+
"navigations": {
118+
"navigation": [
119+
{
120+
"@attributes": {
121+
"role": "admin"
122+
},
123+
"name": "Attributes",
124+
"route": "attributes.once.route",
125+
"icon": "attributes-once.svg",
126+
"order": "5"
127+
}
128+
]
129+
},
130+
"collaboration": {
131+
"plugins": {
132+
"@attributes": {
133+
"type": "collaborator-search"
134+
},
135+
"@value": "OCA\\AttributesOnce\\Collaboration\\Plugin"
136+
}
137+
},
138+
"sabre": {
139+
"plugins": {
140+
"plugin": "OCA\\AttributesOnce\\Sabre\\Plugin"
141+
}
142+
},
143+
"trash": {
144+
"backend": {
145+
"@attributes": {
146+
"for": "files"
147+
},
148+
"@value": "OCA\\AttributesOnce\\Trash\\Backend"
149+
}
150+
},
151+
"versions": {
152+
"backend": {
153+
"@attributes": {
154+
"for": "files"
155+
},
156+
"@value": "OCA\\AttributesOnce\\Versions\\Backend"
157+
}
158+
},
159+
"remote": [],
160+
"public": [],
161+
"two-factor-providers": []
162+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
2+
SPDX-License-Identifier: AGPL-3.0-or-later
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
- SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
4+
- SPDX-License-Identifier: AGPL-3.0-or-later
5+
-->
6+
<info xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7+
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
8+
<id>attributes_once</id>
9+
<name lang="en">Attributes Once</name>
10+
<summary lang="en">Single occurrence with attributes set on allowed elements.</summary>
11+
<description lang="en">Fixture that sets attributes where allowed (e.g., lang, type, min-version, for).</description>
12+
<version>1.2.3</version>
13+
<licence>agpl</licence>
14+
<author homepage="http://example.com" mail="jane@example.com">Jane Doe</author>
15+
<types>
16+
<filesystem/>
17+
</types>
18+
<documentation>
19+
<user>https://example.test/attributes-once/user</user>
20+
</documentation>
21+
<category>tools</category>
22+
<website>https://example.test/attributes-once</website>
23+
<bugs>https://example.com/issues</bugs>
24+
<repository type="git">https://example.test/attributes-once.git</repository>
25+
<screenshot small-thumbnail="https://example.test/attributes-once-small.png">https://example.test/attributes-once.png</screenshot>
26+
<dependencies>
27+
<php min-version="8.2"/>
28+
<database min-version="2.0">pgsql</database>
29+
<lib min-version="1.5">curl</lib>
30+
<owncloud min-version="1.0" max-version="2.0"/>
31+
<nextcloud min-version="30.0" max-version="31.0"/>
32+
<backend>caldav</backend>
33+
</dependencies>
34+
<background-jobs>
35+
<job>OCA\AttributesOnce\BackgroundJob\Job</job>
36+
</background-jobs>
37+
<repair-steps>
38+
<install>
39+
<step>OCA\AttributesOnce\RepairStep\Install</step>
40+
</install>
41+
</repair-steps>
42+
<commands>
43+
<command>OCA\AttributesOnce\Command\Run</command>
44+
</commands>
45+
<settings>
46+
<admin>OCA\AttributesOnce\Settings\Admin</admin>
47+
</settings>
48+
<activity>
49+
<providers>
50+
<provider>OCA\AttributesOnce\Activity\Provider</provider>
51+
</providers>
52+
</activity>
53+
<navigations>
54+
<navigation role="admin">
55+
<name>Attributes</name>
56+
<route>attributes.once.route</route>
57+
<icon>attributes-once.svg</icon>
58+
<order>5</order>
59+
</navigation>
60+
</navigations>
61+
<collaboration>
62+
<plugins>
63+
<plugin type="collaborator-search">OCA\AttributesOnce\Collaboration\Plugin</plugin>
64+
</plugins>
65+
</collaboration>
66+
<sabre>
67+
<plugins>
68+
<plugin>OCA\AttributesOnce\Sabre\Plugin</plugin>
69+
</plugins>
70+
</sabre>
71+
<trash>
72+
<backend for="files">OCA\AttributesOnce\Trash\Backend</backend>
73+
</trash>
74+
<versions>
75+
<backend for="files">OCA\AttributesOnce\Versions\Backend</backend>
76+
</versions>
77+
</info>

0 commit comments

Comments
 (0)