summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-12-11 15:00:17 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-12-11 15:01:45 +0100
commite3dfddb48a5f33a1d368ef92d49b09931b7c289d (patch)
treef2cbcf3414272fad816fe4f00fb36c332fbd4b51
parent1b18554aa7e0af7e13ba8c088375750ea2f53d6c (diff)
downloadnextcloud-server-e3dfddb48a5f33a1d368ef92d49b09931b7c289d.tar.gz
nextcloud-server-e3dfddb48a5f33a1d368ef92d49b09931b7c289d.zip
Add test for getSpecialParameterList()
-rw-r--r--tests/lib/activitymanager.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/lib/activitymanager.php b/tests/lib/activitymanager.php
index 0683eb68193..6a5af7b259b 100644
--- a/tests/lib/activitymanager.php
+++ b/tests/lib/activitymanager.php
@@ -59,6 +59,14 @@ class Test_ActivityManager extends \Test\TestCase {
$this->assertFalse($result);
}
+ public function testGetSpecialParameterList() {
+ $result = $this->activityManager->getSpecialParameterList('APP0', '');
+ $this->assertEquals(array(0 => 'file', 1 => 'username'), $result);
+
+ $result = $this->activityManager->getSpecialParameterList('APP1', '');
+ $this->assertFalse($result);
+ }
+
public function testTypeIcon() {
$result = $this->activityManager->getTypeIcon('NT1');
$this->assertEquals('icon-nt-one', $result);
@@ -132,6 +140,14 @@ class SimpleExtension implements \OCP\Activity\IExtension {
return false;
}
+ public function getSpecialParameterList($app, $text) {
+ if ($app === 'APP0') {
+ return array(0 => 'file', 1 => 'username');
+ }
+
+ return false;
+ }
+
public function getTypeIcon($type) {
if ($type === 'NT1') {
return 'icon-nt-one';
@@ -185,6 +201,10 @@ class NoOpExtension implements \OCP\Activity\IExtension {
return false;
}
+ public function getSpecialParameterList($app, $text) {
+ return false;
+ }
+
public function getTypeIcon($type) {
return false;
}