summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-01-17 01:03:41 +0100
committerLukas Reschke <lukas@owncloud.com>2015-01-17 01:03:41 +0100
commit744cf713f7d6fff80f79465086a522f35d263ff5 (patch)
tree5b01004e362e86b79f33362b1931ee1b91634ed0 /tests
parent08d118eab794ee33c60dcb0fa13d1de495a12dfd (diff)
parent520d8ec53b672e768e59eaf0409559bbecc6c042 (diff)
downloadnextcloud-server-744cf713f7d6fff80f79465086a522f35d263ff5.tar.gz
nextcloud-server-744cf713f7d6fff80f79465086a522f35d263ff5.zip
Merge pull request #13319 from owncloud/replace-line-breaks-in-app-description
replace line breaks in the app description by spaces - fixes #13315
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/app.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/lib/app.php b/tests/lib/app.php
index 1bd350f216a..0c0eb28b3ba 100644
--- a/tests/lib/app.php
+++ b/tests/lib/app.php
@@ -508,5 +508,34 @@ class Test_App extends \Test\TestCase {
// Remove the cache of the mocked apps list with a forceRefresh
\OC_App::getEnabledApps(true);
}
+
+ /**
+ * Providers for the app data values
+ */
+ function appDataProvider() {
+ return [
+ [
+ ['description' => " \t This is a multiline \n test with \n \t \n \n some new lines "],
+ ['description' => "This is a multiline test with\n\nsome new lines"]
+ ],
+ [
+ ['description' => " \t This is a multiline \n test with \n \t some new lines "],
+ ['description' => "This is a multiline test with some new lines"]
+ ],
+ [
+ ['not-a-description' => " \t This is a multiline \n test with \n \t some new lines "],
+ ['not-a-description' => " \t This is a multiline \n test with \n \t some new lines "]
+ ],
+ ];
+ }
+
+ /**
+ * Test app info parser
+ *
+ * @dataProvider appDataProvider
+ */
+ public function testParseAppInfo($data, $expected) {
+ $this->assertEquals($expected, \OC_App::parseAppInfo($data));
+ }
}