summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/user/user.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/lib/user/user.php b/tests/lib/user/user.php
index 6aa7243a75a..85ade9ccaf1 100644
--- a/tests/lib/user/user.php
+++ b/tests/lib/user/user.php
@@ -228,10 +228,19 @@ class User extends \Test\TestCase {
->method('implementsActions')
->will($this->returnValue(false));
- $allConfig = new AllConfig();
+ $allConfig = $this->getMockBuilder('\OC\AllConfig')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $allConfig->expects($this->any())
+ ->method('getUserValue')
+ ->will($this->returnValue(true));
+ $allConfig->expects($this->any())
+ ->method('getSystemValue')
+ ->with($this->equalTo('datadirectory'))
+ ->will($this->returnValue('arbitrary/path'));
$user = new \OC\User\User('foo', $backend, null, $allConfig);
- $this->assertEquals(\OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data") . '/foo', $user->getHome());
+ $this->assertEquals('arbitrary/path/foo', $user->getHome());
}
public function testCanChangePassword() {