]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add test for getSpecialParameterList()
authorJoas Schilling <nickvergessen@gmx.de>
Thu, 11 Dec 2014 14:00:17 +0000 (15:00 +0100)
committerJoas Schilling <nickvergessen@gmx.de>
Thu, 11 Dec 2014 14:01:45 +0000 (15:01 +0100)
tests/lib/activitymanager.php

index 0683eb68193129f4d527672667899e037fb7fd73..6a5af7b259bd040589ef8d77112be51233571cc8 100644 (file)
@@ -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;
        }