summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-12-19 13:15:50 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-12-19 13:15:50 +0100
commit2d647973202151c12a3bd5f0396657212b1f7b7f (patch)
treee8c775f5b0ece150818a78540edd7abbd6d87274 /tests
parent678642a6a274610dc62f627d43be9ca42286858a (diff)
parent6da33e1ea7bb340e22330941d2a980a1414210b0 (diff)
downloadnextcloud-server-2d647973202151c12a3bd5f0396657212b1f7b7f.tar.gz
nextcloud-server-2d647973202151c12a3bd5f0396657212b1f7b7f.zip
Merge pull request #12956 from owncloud/jenkins-user-backend-names
[jenkins only] introduce names for user backends - IUserBackend
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/user/manager.php10
-rw-r--r--tests/lib/user/user.php4
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/lib/user/manager.php b/tests/lib/user/manager.php
index 9cb9374d89f..cc8bcd65896 100644
--- a/tests/lib/user/manager.php
+++ b/tests/lib/user/manager.php
@@ -380,6 +380,10 @@ class Manager extends \Test\TestCase {
->with(\OC_USER_BACKEND_COUNT_USERS)
->will($this->returnValue(true));
+ $backend->expects($this->once())
+ ->method('getBackendName')
+ ->will($this->returnValue('Mock_OC_User_Dummy'));
+
$manager = new \OC\User\Manager();
$manager->registerBackend($backend);
@@ -404,6 +408,9 @@ class Manager extends \Test\TestCase {
->method('implementsActions')
->with(\OC_USER_BACKEND_COUNT_USERS)
->will($this->returnValue(true));
+ $backend1->expects($this->once())
+ ->method('getBackendName')
+ ->will($this->returnValue('Mock_OC_User_Dummy'));
$backend2 = $this->getMock('\OC_User_Dummy');
$backend2->expects($this->once())
@@ -414,6 +421,9 @@ class Manager extends \Test\TestCase {
->method('implementsActions')
->with(\OC_USER_BACKEND_COUNT_USERS)
->will($this->returnValue(true));
+ $backend2->expects($this->once())
+ ->method('getBackendName')
+ ->will($this->returnValue('Mock_OC_User_Dummy'));
$manager = new \OC\User\Manager();
$manager->registerBackend($backend1);
diff --git a/tests/lib/user/user.php b/tests/lib/user/user.php
index e7085182fd6..b1df975b60f 100644
--- a/tests/lib/user/user.php
+++ b/tests/lib/user/user.php
@@ -217,9 +217,9 @@ class User extends \Test\TestCase {
public function testGetBackendClassName() {
$user = new \OC\User\User('foo', new \OC_User_Dummy());
- $this->assertEquals('OC_User_Dummy', $user->getBackendClassName());
+ $this->assertEquals('Dummy', $user->getBackendClassName());
$user = new \OC\User\User('foo', new \OC_User_Database());
- $this->assertEquals('OC_User_Database', $user->getBackendClassName());
+ $this->assertEquals('Database', $user->getBackendClassName());
}
public function testGetHomeNotSupported() {