diff options
Diffstat (limited to 'apps/user_ldap/tests/AccessTest.php')
-rw-r--r-- | apps/user_ldap/tests/AccessTest.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/user_ldap/tests/AccessTest.php b/apps/user_ldap/tests/AccessTest.php index 336b92af04f..43a34959c54 100644 --- a/apps/user_ldap/tests/AccessTest.php +++ b/apps/user_ldap/tests/AccessTest.php @@ -72,6 +72,8 @@ class AccessTest extends TestCase { private $helper; /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ private $config; + /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ + private $ncUserManager; /** @var Access */ private $access; @@ -82,13 +84,15 @@ class AccessTest extends TestCase { $this->helper = $this->createMock(Helper::class); $this->config = $this->createMock(IConfig::class); $this->userMapper = $this->createMock(UserMapping::class); + $this->ncUserManager = $this->createMock(IUserManager::class); $this->access = new Access( $this->connection, $this->ldap, $this->userManager, $this->helper, - $this->config + $this->config, + $this->ncUserManager ); $this->access->setUserMapper($this->userMapper); } @@ -227,7 +231,7 @@ class AccessTest extends TestCase { list($lw, $con, $um, $helper) = $this->getConnectorAndLdapMock(); /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject $config */ $config = $this->createMock(IConfig::class); - $access = new Access($con, $lw, $um, $helper, $config); + $access = new Access($con, $lw, $um, $helper, $config, $this->ncUserManager); $lw->expects($this->exactly(1)) ->method('explodeDN') @@ -250,7 +254,7 @@ class AccessTest extends TestCase { /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject $config */ $config = $this->createMock(IConfig::class); $lw = new LDAP(); - $access = new Access($con, $lw, $um, $helper, $config); + $access = new Access($con, $lw, $um, $helper, $config, $this->ncUserManager); if(!function_exists('ldap_explode_dn')) { $this->markTestSkipped('LDAP Module not available'); @@ -431,7 +435,7 @@ class AccessTest extends TestCase { $attribute => array('count' => 1, $dnFromServer) ))); - $access = new Access($con, $lw, $um, $helper, $config); + $access = new Access($con, $lw, $um, $helper, $config, $this->ncUserManager); $values = $access->readAttribute('uid=whoever,dc=example,dc=org', $attribute); $this->assertSame($values[0], strtolower($dnFromServer)); } |