From 7eba1d806b6d0034ba399ad3aeedc336e600ab62 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 11 Oct 2016 19:47:59 +0200 Subject: Add tests for commands in info.xml Signed-off-by: Roeland Jago Douma --- tests/lib/InfoXmlTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/lib/InfoXmlTest.php b/tests/lib/InfoXmlTest.php index bf6cd08ee39..4e75ca78203 100644 --- a/tests/lib/InfoXmlTest.php +++ b/tests/lib/InfoXmlTest.php @@ -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)); + } + } } } -- cgit v1.2.3