diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-10-27 19:03:40 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-10-27 19:10:38 +0100 |
commit | f96e552164a9648de4b4f8daab73ddaa966d9666 (patch) | |
tree | 191aa5ce8eb33ef7fbc48b19c8821a48b2f4ba32 /apps/user_ldap/tests/access.php | |
parent | e1d61284f87f2bb5aaf1523ce4f78e439d737165 (diff) | |
download | nextcloud-server-f96e552164a9648de4b4f8daab73ddaa966d9666.tar.gz nextcloud-server-f96e552164a9648de4b4f8daab73ddaa966d9666.zip |
fix attribute casing to ensure array keys work
Diffstat (limited to 'apps/user_ldap/tests/access.php')
-rw-r--r-- | apps/user_ldap/tests/access.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/apps/user_ldap/tests/access.php b/apps/user_ldap/tests/access.php index cb6dbf0cd5d..25e871d9b3d 100644 --- a/apps/user_ldap/tests/access.php +++ b/apps/user_ldap/tests/access.php @@ -230,24 +230,34 @@ class Test_Access extends \Test\TestCase { $mapperMock = $this->getMockBuilder('\OCA\User_LDAP\Mapping\UserMapping') ->disableOriginalConstructor() ->getMock(); + + $mapperMock->expects($this->any()) + ->method('getNameByDN') + ->will($this->returnValue('a_username')); + $userMock = $this->getMockBuilder('\OCA\user_ldap\lib\user\User') ->disableOriginalConstructor() ->getMock(); + $access->connection->expects($this->any()) + ->method('__get') + ->will($this->returnValue('displayName')); + $access->setUserMapper($mapperMock); + $displayNameAttribute = strtolower($access->connection->ldapUserDisplayName); $data = array( array( 'dn' => 'foobar', - $con->ldapUserDisplayName => 'barfoo' + $displayNameAttribute => 'barfoo' ), array( 'dn' => 'foo', - $con->ldapUserDisplayName => 'bar' + $displayNameAttribute => 'bar' ), array( 'dn' => 'raboof', - $con->ldapUserDisplayName => 'oofrab' + $displayNameAttribute => 'oofrab' ) ); |