aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-18 14:54:38 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-18 14:54:38 +0100
commita743047e8228fb4973d99e0101dec5e6c39f81b9 (patch)
tree29b3856717f150181f867f530a61c6007388b49c /tests/lib
parent50e877330700117ace281236ce7ecc1ae0f9521b (diff)
parent6fb60815c581c333106e0fa4845eb25ad6a5223b (diff)
downloadnextcloud-server-a743047e8228fb4973d99e0101dec5e6c39f81b9.tar.gz
nextcloud-server-a743047e8228fb4973d99e0101dec5e6c39f81b9.zip
Merge pull request #21283 from owncloud/cleanup_config
Cleanup OC_Config mess
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/allconfig.php16
-rw-r--r--tests/lib/server.php3
2 files changed, 14 insertions, 5 deletions
diff --git a/tests/lib/allconfig.php b/tests/lib/allconfig.php
index ca3dce12eaf..0caf8163cfc 100644
--- a/tests/lib/allconfig.php
+++ b/tests/lib/allconfig.php
@@ -28,7 +28,9 @@ class TestAllConfig extends \Test\TestCase {
$connection = $this->connection;
}
if($systemConfig === null) {
- $systemConfig = $this->getMock('\OC\SystemConfig');
+ $systemConfig = $this->getMockBuilder('\OC\SystemConfig')
+ ->disableOriginalConstructor()
+ ->getMock();
}
return new \OC\AllConfig($systemConfig, $connection);
}
@@ -89,7 +91,9 @@ class TestAllConfig extends \Test\TestCase {
public function testSetUserValueWithPreCondition() {
// mock the check for the database to run the correct SQL statements for each database type
- $systemConfig = $this->getMock('\OC\SystemConfig');
+ $systemConfig = $this->getMockBuilder('\OC\SystemConfig')
+ ->disableOriginalConstructor()
+ ->getMock();
$systemConfig->expects($this->once())
->method('getValue')
->with($this->equalTo('dbtype'),
@@ -133,7 +137,9 @@ class TestAllConfig extends \Test\TestCase {
*/
public function testSetUserValueWithPreConditionFailure() {
// mock the check for the database to run the correct SQL statements for each database type
- $systemConfig = $this->getMock('\OC\SystemConfig');
+ $systemConfig = $this->getMockBuilder('\OC\SystemConfig')
+ ->disableOriginalConstructor()
+ ->getMock();
$systemConfig->expects($this->once())
->method('getValue')
->with($this->equalTo('dbtype'),
@@ -394,7 +400,9 @@ class TestAllConfig extends \Test\TestCase {
public function testGetUsersForUserValue() {
// mock the check for the database to run the correct SQL statements for each database type
- $systemConfig = $this->getMock('\OC\SystemConfig');
+ $systemConfig = $this->getMockBuilder('\OC\SystemConfig')
+ ->disableOriginalConstructor()
+ ->getMock();
$systemConfig->expects($this->once())
->method('getValue')
->with($this->equalTo('dbtype'),
diff --git a/tests/lib/server.php b/tests/lib/server.php
index 6b569e77dd9..e2670061e8d 100644
--- a/tests/lib/server.php
+++ b/tests/lib/server.php
@@ -38,7 +38,8 @@ class Server extends \Test\TestCase {
public function setUp() {
parent::setUp();
- $this->server = new \OC\Server('');
+ $config = new \OC\Config(\OC::$configDir);
+ $this->server = new \OC\Server('', $config);
}
public function dataTestQuery() {