aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/tests/wizard.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-06-25 17:36:19 +0200
committerArthur Schiwon <blizzz@owncloud.com>2014-08-29 11:14:16 +0200
commit441c600c906a2ec55bdab123840be5d1d63bb679 (patch)
treed6880aa4c343d010e340761a0ba453de1eff06b9 /apps/user_ldap/tests/wizard.php
parentbaa49cd58a670ca7fdd9211cf057b2257d86eff9 (diff)
downloadnextcloud-server-441c600c906a2ec55bdab123840be5d1d63bb679.tar.gz
nextcloud-server-441c600c906a2ec55bdab123840be5d1d63bb679.zip
remove Access as hard dependency, inject it instead
Diffstat (limited to 'apps/user_ldap/tests/wizard.php')
-rw-r--r--apps/user_ldap/tests/wizard.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/apps/user_ldap/tests/wizard.php b/apps/user_ldap/tests/wizard.php
index 50461432c42..fcf4d71087f 100644
--- a/apps/user_ldap/tests/wizard.php
+++ b/apps/user_ldap/tests/wizard.php
@@ -46,13 +46,24 @@ class Test_Wizard extends \PHPUnit_Framework_TestCase {
static $conMethods;
if(is_null($conMethods)) {
- $conMethods = get_class_methods('\OCA\user_ldap\lib\Configuration');
+ $confMethods = get_class_methods('\OCA\user_ldap\lib\Configuration');
+ $connMethods = get_class_methods('\OCA\user_ldap\lib\Connection');
+ $accMethods = get_class_methods('\OCA\user_ldap\lib\Access');
}
$lw = $this->getMock('\OCA\user_ldap\lib\ILDAPWrapper');
$conf = $this->getMock('\OCA\user_ldap\lib\Configuration',
- $conMethods,
+ $confMethods,
array($lw, null, null));
- return array(new Wizard($conf, $lw), $conf, $lw);
+
+ $connector = $this->getMock('\OCA\user_ldap\lib\Connection',
+ $connMethods, array($lw, null, null));
+ $um = $this->getMockBuilder('\OCA\user_ldap\lib\user\Manager')
+ ->disableOriginalConstructor()
+ ->getMock();
+ $access = $this->getMock('\OCA\user_ldap\lib\Access',
+ $accMethods, array($connector, $lw, $um));
+
+ return array(new Wizard($conf, $lw, $access), $conf, $lw);
}
private function prepareLdapWrapperForConnections(&$ldap) {