diff options
Diffstat (limited to 'apps/user_ldap/tests/WizardTest.php')
-rw-r--r-- | apps/user_ldap/tests/WizardTest.php | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/apps/user_ldap/tests/WizardTest.php b/apps/user_ldap/tests/WizardTest.php index af3b692c7dd..545d112338b 100644 --- a/apps/user_ldap/tests/WizardTest.php +++ b/apps/user_ldap/tests/WizardTest.php @@ -61,18 +61,24 @@ class WizardTest extends \Test\TestCase { $accMethods = get_class_methods('\OCA\User_LDAP\Access'); } $lw = $this->createMock(ILDAPWrapper::class); - $conf = $this->getMock('\OCA\User_LDAP\Configuration', - $confMethods, - array($lw, null, null)); - - $connector = $this->getMock('\OCA\User_LDAP\Connection', - $connMethods, array($lw, null, null)); + $conf = $this->getMockBuilder('\OCA\User_LDAP\Configuration') + ->setMethods($confMethods) + ->setConstructorArgs([$lw, null, null]) + ->getMock(); + + $connector = $this->getMockBuilder('\OCA\User_LDAP\Connection') + ->setMethods($connMethods) + ->setConstructorArgs([$lw, null, null]) + ->getMock(); + $um = $this->getMockBuilder('\OCA\User_LDAP\User\Manager') - ->disableOriginalConstructor() - ->getMock(); + ->disableOriginalConstructor() + ->getMock(); $helper = new \OCA\User_LDAP\Helper(\OC::$server->getConfig()); - $access = $this->getMock('\OCA\User_LDAP\Access', - $accMethods, array($connector, $lw, $um, $helper)); + $access = $this->getMockBuilder('\OCA\User_LDAP\Access') + ->setMethods($accMethods) + ->setConstructorArgs([$connector, $lw, $um, $helper]) + ->getMock(); return array(new Wizard($conf, $lw, $access), $conf, $lw, $access); } |