summaryrefslogtreecommitdiffstats
path: root/tests/lib/app
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-12-05 14:51:41 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-12-11 12:02:12 +0100
commitee46548f57310b45ce723fd03ec29bfb686f8bc2 (patch)
tree8c9f08b00e1b9cd9da567439a9f90993f6d3917a /tests/lib/app
parent770f9876595a3cebd4b911a237ec1e681bc506be (diff)
downloadnextcloud-server-ee46548f57310b45ce723fd03ec29bfb686f8bc2.tar.gz
nextcloud-server-ee46548f57310b45ce723fd03ec29bfb686f8bc2.zip
adding dependencies for supported platforms
Diffstat (limited to 'tests/lib/app')
-rw-r--r--tests/lib/app/dependencyanalyzer.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/lib/app/dependencyanalyzer.php b/tests/lib/app/dependencyanalyzer.php
index 872d5cfb2c5..1cd24193ea6 100644
--- a/tests/lib/app/dependencyanalyzer.php
+++ b/tests/lib/app/dependencyanalyzer.php
@@ -141,6 +141,34 @@ class DependencyAnalyzer extends \PHPUnit_Framework_TestCase {
$this->assertEquals($expectedMissing, $missing);
}
+ /**
+ * @dataProvider providesOS
+ * @param $expectedMissing
+ * @param $oss
+ */
+ function testOS($expectedMissing, $oss) {
+ $app = array(
+ 'dependencies' => array()
+ );
+ if (!is_null($oss)) {
+ $app['dependencies']['os'] = $oss;
+ }
+
+ $analyser = new \OC\App\DependencyAnalyzer($app, $this->platformMock, $this->l10nMock);
+ $missing = $analyser->analyze();
+
+ $this->assertTrue(is_array($missing));
+ $this->assertEquals($expectedMissing, $missing);
+ }
+
+ function providesOS() {
+ return array(
+ array(array(), null),
+ array(array(), array()),
+ array(array('Following platforms are supported: WINNT'), array('WINNT'))
+ );
+ }
+
function providesLibs() {
return array(
// we expect curl to exist