diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-07-30 09:02:35 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-07-30 09:02:35 +0200 |
commit | 4d672ded244e5e8a242d649588879979bdde1bb6 (patch) | |
tree | 104bd9ef23d290c0ddc7d21101883c8fba77fa00 | |
parent | c3cac887f57278a21052391c99b37a6dfb8cef9f (diff) | |
download | nextcloud-server-4d672ded244e5e8a242d649588879979bdde1bb6.tar.gz nextcloud-server-4d672ded244e5e8a242d649588879979bdde1bb6.zip |
properly mock dependencies for setup tests
-rw-r--r-- | tests/lib/setup.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/lib/setup.php b/tests/lib/setup.php index d07eaa40ee0..fa9fe08ed95 100644 --- a/tests/lib/setup.php +++ b/tests/lib/setup.php @@ -20,6 +20,10 @@ class Test_OC_Setup extends \Test\TestCase { private $defaults; /** @var \OC\Setup | PHPUnit_Framework_MockObject_MockObject */ protected $setupClass; + /** @var \OCP\ILogger | PHPUnit_Framework_MockObject_MockObject */ + protected $logger; + /** @var \OCP\Security\ISecureRandom | PHPUnit_Framework_MockObject_MockObject */ + protected $random; protected function setUp() { parent::setUp(); @@ -28,9 +32,11 @@ class Test_OC_Setup extends \Test\TestCase { $this->iniWrapper = $this->getMock('\bantu\IniGetWrapper\IniGetWrapper'); $this->l10n = $this->getMock('\OCP\IL10N'); $this->defaults = $this->getMock('\OC_Defaults'); + $this->logger = $this->getMock('\OCP\ILogger'); + $this->random = $this->getMock('\OCP\Security\ISecureRandom'); $this->setupClass = $this->getMock('\OC\Setup', ['class_exists', 'is_callable'], - [$this->config, $this->iniWrapper, $this->l10n, $this->defaults]); + [$this->config, $this->iniWrapper, $this->l10n, $this->defaults, $this->logger, $this->random]); } public function testGetSupportedDatabasesWithOneWorking() { |