diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-10 23:44:29 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-11 09:27:12 +0100 |
commit | 6c1a1234f8c5a064a72cb23cd397edcb9c6f0577 (patch) | |
tree | 531cc7f3dd6b70f6604f719828f7ba98c37dda63 /tests | |
parent | 81fa9550a0e136421c1dacad3d26fdb19e9c63a3 (diff) | |
download | nextcloud-server-6c1a1234f8c5a064a72cb23cd397edcb9c6f0577.tar.gz nextcloud-server-6c1a1234f8c5a064a72cb23cd397edcb9c6f0577.zip |
Properly handle available databases at runtime and respect setup checks in command line as well
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/setup.php | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/lib/setup.php b/tests/lib/setup.php index db6f0e7a05f..caaeec08fb3 100644 --- a/tests/lib/setup.php +++ b/tests/lib/setup.php @@ -10,16 +10,27 @@ use OCP\IConfig; class Test_OC_Setup extends \Test\TestCase { - /** @var IConfig */ + /** @var IConfig | PHPUnit_Framework_MockObject_MockObject */ protected $config; - /** @var \OC\Setup */ + /** @var \bantu\IniGetWrapper\IniGetWrapper | PHPUnit_Framework_MockObject_MockObject */ + private $iniWrapper; + /** @var \OCP\IL10N | PHPUnit_Framework_MockObject_MockObject */ + private $l10n; + /** @var \OC_Defaults | PHPUnit_Framework_MockObject_MockObject */ + private $defaults; + /** @var \OC\Setup | PHPUnit_Framework_MockObject_MockObject */ protected $setupClass; protected function setUp() { parent::setUp(); $this->config = $this->getMock('\OCP\IConfig'); - $this->setupClass = $this->getMock('\OC\Setup', ['class_exists', 'is_callable'], [$this->config]); + $this->iniWrapper = $this->getMock('\bantu\IniGetWrapper\IniGetWrapper'); + $this->l10n = $this->getMock('\OCP\IL10N'); + $this->defaults = $this->getMock('\OC_Defaults'); + $this->setupClass = $this->getMock('\OC\Setup', + ['class_exists', 'is_callable'], + [$this->config, $this->iniWrapper, $this->l10n, $this->defaults]); } public function testGetSupportedDatabasesWithOneWorking() { |