diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2015-12-18 11:24:15 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2015-12-18 11:53:41 +0100 |
commit | 0a09004d39b5d27124d59ed45debf109170b24d2 (patch) | |
tree | b58a53749187396ed6ed5a962a15f06c66b071b8 /tests/lib/allconfig.php | |
parent | 82bf99c0cfd764b25d1442cf199f219cd852ff69 (diff) | |
download | nextcloud-server-0a09004d39b5d27124d59ed45debf109170b24d2.tar.gz nextcloud-server-0a09004d39b5d27124d59ed45debf109170b24d2.zip |
Inject Config into SystemConfig
Diffstat (limited to 'tests/lib/allconfig.php')
-rw-r--r-- | tests/lib/allconfig.php | 16 |
1 files changed, 12 insertions, 4 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'), |