Skip to content
Snippets Groups Projects
Unverified Commit 65409f53 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Fix getMock SetupTest

parent e1096c96
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,11 @@ ...@@ -8,7 +8,11 @@
namespace Test; namespace Test;
use bantu\IniGetWrapper\IniGetWrapper;
use OCP\IConfig; use OCP\IConfig;
use OCP\IL10N;
use OCP\ILogger;
use OCP\Security\ISecureRandom;
class SetupTest extends \Test\TestCase { class SetupTest extends \Test\TestCase {
...@@ -30,15 +34,16 @@ class SetupTest extends \Test\TestCase { ...@@ -30,15 +34,16 @@ class SetupTest extends \Test\TestCase {
protected function setUp() { protected function setUp() {
parent::setUp(); parent::setUp();
$this->config = $this->getMock('\OCP\IConfig'); $this->config = $this->createMock(IConfig::class);
$this->iniWrapper = $this->getMock('\bantu\IniGetWrapper\IniGetWrapper'); $this->iniWrapper = $this->createMock(IniGetWrapper::class);
$this->l10n = $this->getMock('\OCP\IL10N'); $this->l10n = $this->createMock(IL10N::class);
$this->defaults = $this->getMock('\OC_Defaults'); $this->defaults = $this->createMock(\OC_Defaults::class);
$this->logger = $this->getMock('\OCP\ILogger'); $this->logger = $this->createMock(ILogger::class);
$this->random = $this->getMock('\OCP\Security\ISecureRandom'); $this->random = $this->createMock(ISecureRandom::class);
$this->setupClass = $this->getMock('\OC\Setup', $this->setupClass = $this->getMockBuilder('\OC\Setup')
['class_exists', 'is_callable', 'getAvailableDbDriversForPdo'], ->setMethods(['class_exists', 'is_callable', 'getAvailableDbDriversForPdo'])
[$this->config, $this->iniWrapper, $this->l10n, $this->defaults, $this->logger, $this->random]); ->setConstructorArgs([$this->config, $this->iniWrapper, $this->l10n, $this->defaults, $this->logger, $this->random])
->getMock();
} }
public function testGetSupportedDatabasesWithOneWorking() { public function testGetSupportedDatabasesWithOneWorking() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment