Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-09-07 21:22:02 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2016-09-07 21:42:38 +0300
commit65409f53274e6dbbfdcac1726546b9fd32c99677 (patch)
tree5061a53220a1d7f62128fea3f5ce17c22db65be3 /tests/lib/SetupTest.php
parente1096c964d4f509f2bcee55d1f6bd0a36517a3d9 (diff)
Fix getMock SetupTest
Diffstat (limited to 'tests/lib/SetupTest.php')
-rw-r--r--tests/lib/SetupTest.php23
1 files changed, 14 insertions, 9 deletions
diff --git a/tests/lib/SetupTest.php b/tests/lib/SetupTest.php
index c6e219f4029..a8389eaaf56 100644
--- a/tests/lib/SetupTest.php
+++ b/tests/lib/SetupTest.php
@@ -8,7 +8,11 @@
namespace Test;
+use bantu\IniGetWrapper\IniGetWrapper;
use OCP\IConfig;
+use OCP\IL10N;
+use OCP\ILogger;
+use OCP\Security\ISecureRandom;
class SetupTest extends \Test\TestCase {
@@ -30,15 +34,16 @@ class SetupTest extends \Test\TestCase {
protected function setUp() {
parent::setUp();
- $this->config = $this->getMock('\OCP\IConfig');
- $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', 'getAvailableDbDriversForPdo'],
- [$this->config, $this->iniWrapper, $this->l10n, $this->defaults, $this->logger, $this->random]);
+ $this->config = $this->createMock(IConfig::class);
+ $this->iniWrapper = $this->createMock(IniGetWrapper::class);
+ $this->l10n = $this->createMock(IL10N::class);
+ $this->defaults = $this->createMock(\OC_Defaults::class);
+ $this->logger = $this->createMock(ILogger::class);
+ $this->random = $this->createMock(ISecureRandom::class);
+ $this->setupClass = $this->getMockBuilder('\OC\Setup')
+ ->setMethods(['class_exists', 'is_callable', 'getAvailableDbDriversForPdo'])
+ ->setConstructorArgs([$this->config, $this->iniWrapper, $this->l10n, $this->defaults, $this->logger, $this->random])
+ ->getMock();
}
public function testGetSupportedDatabasesWithOneWorking() {