diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-12-05 14:51:41 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-12-11 12:02:12 +0100 |
commit | ee46548f57310b45ce723fd03ec29bfb686f8bc2 (patch) | |
tree | 8c9f08b00e1b9cd9da567439a9f90993f6d3917a /tests/lib/app | |
parent | 770f9876595a3cebd4b911a237ec1e681bc506be (diff) | |
download | nextcloud-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.php | 28 |
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 |