diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-06-25 17:36:19 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-08-29 11:14:16 +0200 |
commit | 441c600c906a2ec55bdab123840be5d1d63bb679 (patch) | |
tree | d6880aa4c343d010e340761a0ba453de1eff06b9 /apps/user_ldap/tests/wizard.php | |
parent | baa49cd58a670ca7fdd9211cf057b2257d86eff9 (diff) | |
download | nextcloud-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.php | 17 |
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) { |