]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add tests for commands in info.xml 1705/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Tue, 11 Oct 2016 17:47:59 +0000 (19:47 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Tue, 11 Oct 2016 17:48:31 +0000 (19:48 +0200)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tests/lib/InfoXmlTest.php

index bf6cd08ee39ed592219858d9a3d33c0bf5f82f7a..4e75ca7820353db53a5fa667969df111bb745707 100644 (file)
@@ -118,5 +118,12 @@ class InfoXmlTest extends TestCase {
                                $this->assertInstanceOf($migration, \OC::$server->query($migration));
                        }
                }
+
+               if (isset($appInfo['commands'])) {
+                       foreach ($appInfo['commands'] as $command) {
+                               $this->assertTrue(class_exists($command), 'Asserting command "'. $command . '"exists');
+                               $this->assertInstanceOf($command, \OC::$server->query($command));
+                       }
+               }
        }
 }