diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-18 14:54:38 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-18 14:54:38 +0100 |
commit | a743047e8228fb4973d99e0101dec5e6c39f81b9 (patch) | |
tree | 29b3856717f150181f867f530a61c6007388b49c /tests/lib | |
parent | 50e877330700117ace281236ce7ecc1ae0f9521b (diff) | |
parent | 6fb60815c581c333106e0fa4845eb25ad6a5223b (diff) | |
download | nextcloud-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.php | 16 | ||||
-rw-r--r-- | tests/lib/server.php | 3 |
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() { |