diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-05-12 11:25:50 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-05-25 16:04:56 +0200 |
commit | 3f5e76162d74701c35a31b5a611466dba93d9a04 (patch) | |
tree | 5dc6b119f48333057dc45e2c04ba5873c889dc67 /apps/user_ldap/tests | |
parent | b7fa5277915507622cc7043dc62998d849b8807d (diff) | |
download | nextcloud-server-3f5e76162d74701c35a31b5a611466dba93d9a04.tar.gz nextcloud-server-3f5e76162d74701c35a31b5a611466dba93d9a04.zip |
Move lib\user to PSR-4
Diffstat (limited to 'apps/user_ldap/tests')
17 files changed, 37 insertions, 36 deletions
diff --git a/apps/user_ldap/tests/GroupLDAPTest.php b/apps/user_ldap/tests/GroupLDAPTest.php index 2075f42fa51..02392e6e610 100644 --- a/apps/user_ldap/tests/GroupLDAPTest.php +++ b/apps/user_ldap/tests/GroupLDAPTest.php @@ -51,7 +51,7 @@ class GroupLDAPTest extends \Test\TestCase { $connector = $this->getMock('\OCA\user_ldap\lib\Connection', $conMethods, array($lw, null, null)); - $um = $this->getMockBuilder('\OCA\user_ldap\lib\user\Manager') + $um = $this->getMockBuilder('\OCA\User_LDAP\User\Manager') ->disableOriginalConstructor() ->getMock(); $access = $this->getMock('\OCA\user_ldap\lib\Access', diff --git a/apps/user_ldap/tests/user/manager.php b/apps/user_ldap/tests/User/ManagerTest.php index c4af1009df8..03a1dfbeb47 100644 --- a/apps/user_ldap/tests/user/manager.php +++ b/apps/user_ldap/tests/User/ManagerTest.php @@ -23,9 +23,9 @@ * */ -namespace OCA\user_ldap\tests; +namespace OCA\User_LDAP\Tests\User; -use OCA\user_ldap\lib\user\Manager; +use OCA\User_LDAP\User\Manager; /** * Class Test_User_Manager @@ -34,10 +34,10 @@ use OCA\user_ldap\lib\user\Manager; * * @package OCA\user_ldap\tests */ -class Test_User_Manager extends \Test\TestCase { +class ManagerTest extends \Test\TestCase { private function getTestInstances() { - $access = $this->getMock('\OCA\user_ldap\lib\user\IUserTools'); + $access = $this->getMock('\OCA\User_LDAP\User\IUserTools'); $config = $this->getMock('\OCP\IConfig'); $filesys = $this->getMock('\OCA\user_ldap\lib\FilesystemHelper'); $log = $this->getMock('\OCA\user_ldap\lib\LogWrapper'); @@ -87,7 +87,7 @@ class Test_User_Manager extends \Test\TestCase { // runtime caching the manager is broken. $user = $manager->get($inputDN); - $this->assertInstanceOf('\OCA\user_ldap\lib\user\User', $user); + $this->assertInstanceOf('\OCA\User_LDAP\User\User', $user); } public function testGetByEDirectoryDN() { @@ -114,7 +114,7 @@ class Test_User_Manager extends \Test\TestCase { $manager->setLdapAccess($access); $user = $manager->get($inputDN); - $this->assertInstanceOf('\OCA\user_ldap\lib\user\User', $user); + $this->assertInstanceOf('\OCA\User_LDAP\User\User', $user); } public function testGetByExoticDN() { @@ -141,7 +141,7 @@ class Test_User_Manager extends \Test\TestCase { $manager->setLdapAccess($access); $user = $manager->get($inputDN); - $this->assertInstanceOf('\OCA\user_ldap\lib\user\User', $user); + $this->assertInstanceOf('\OCA\User_LDAP\User\User', $user); } public function testGetByDNNotExisting() { @@ -200,7 +200,7 @@ class Test_User_Manager extends \Test\TestCase { // runtime caching the manager is broken. $user = $manager->get($uid); - $this->assertInstanceOf('\OCA\user_ldap\lib\user\User', $user); + $this->assertInstanceOf('\OCA\User_LDAP\User\User', $user); } public function testGetByUidNotExisting() { diff --git a/apps/user_ldap/tests/user/user.php b/apps/user_ldap/tests/User/UserTest.php index ed04520aa74..81497b4bcb8 100644 --- a/apps/user_ldap/tests/user/user.php +++ b/apps/user_ldap/tests/User/UserTest.php @@ -22,9 +22,9 @@ * */ -namespace OCA\user_ldap\tests; +namespace OCA\User_LDAP\Tests\User; -use OCA\user_ldap\lib\user\User; +use OCA\User_LDAP\User\User; use OCP\IUserManager; /** @@ -34,10 +34,10 @@ use OCP\IUserManager; * * @package OCA\user_ldap\tests */ -class Test_User_User extends \Test\TestCase { +class UserTest extends \Test\TestCase { private function getTestInstances() { - $access = $this->getMock('\OCA\user_ldap\lib\user\IUserTools'); + $access = $this->getMock('\OCA\User_LDAP\User\IUserTools'); $config = $this->getMock('\OCP\IConfig'); $filesys = $this->getMock('\OCA\user_ldap\lib\FilesystemHelper'); $log = $this->getMock('\OCA\user_ldap\lib\LogWrapper'); @@ -59,14 +59,14 @@ class Test_User_User extends \Test\TestCase { $accMethods = get_class_methods('\OCA\user_ldap\lib\Access'); //getConnection shall not be replaced unset($accMethods[array_search('getConnection', $accMethods)]); - $umMethods = get_class_methods('\OCA\user_ldap\lib\user\Manager'); + $umMethods = get_class_methods('\OCA\User_LDAP\User\Manager'); } $lw = $this->getMock('\OCA\user_ldap\lib\ILDAPWrapper'); $im = $this->getMock('\OCP\Image'); if (is_null($userMgr)) { $userMgr = $this->getMock('\OCP\IUserManager'); } - $um = $this->getMock('\OCA\user_ldap\lib\user\Manager', + $um = $this->getMock('\OCA\User_LDAP\User\Manager', $umMethods, array($cfMock, $fsMock, $logMock, $avaMgr, $im, $dbc, $userMgr)); $connector = $this->getMock('\OCA\user_ldap\lib\Connection', $conMethods, array($lw, null, null)); @@ -763,7 +763,7 @@ class Test_User_User extends \Test\TestCase { 'updateAvatar' ); - $userMock = $this->getMockBuilder('OCA\user_ldap\lib\user\User') + $userMock = $this->getMockBuilder('OCA\User_LDAP\User\User') ->setConstructorArgs(array($uid, $dn, $access, $config, $filesys, $image, $log, $avaMgr, $userMgr)) ->setMethods($requiredMethods) ->getMock(); diff --git a/apps/user_ldap/tests/User_LDAPTest.php b/apps/user_ldap/tests/User_LDAPTest.php index e9e277ee737..fb36ee94e27 100644 --- a/apps/user_ldap/tests/User_LDAPTest.php +++ b/apps/user_ldap/tests/User_LDAPTest.php @@ -60,7 +60,7 @@ class User_LDAPTest extends \Test\TestCase { $conMethods = get_class_methods('\OCA\user_ldap\lib\Connection'); $accMethods = get_class_methods('\OCA\user_ldap\lib\Access'); unset($accMethods[array_search('getConnection', $accMethods)]); - $uMethods = get_class_methods('\OCA\user_ldap\lib\user\User'); + $uMethods = get_class_methods('\OCA\User_LDAP\User\User'); unset($uMethods[array_search('getUsername', $uMethods)]); unset($uMethods[array_search('getDN', $uMethods)]); unset($uMethods[array_search('__construct', $uMethods)]); @@ -72,11 +72,11 @@ class User_LDAPTest extends \Test\TestCase { $this->configMock = $this->getMock('\OCP\IConfig'); - $offlineUser = $this->getMockBuilder('\OCA\user_ldap\lib\user\OfflineUser') + $offlineUser = $this->getMockBuilder('\OCA\User_LDAP\User\OfflineUser') ->disableOriginalConstructor() ->getMock(); - $um = $this->getMockBuilder('\OCA\user_ldap\lib\user\Manager') + $um = $this->getMockBuilder('\OCA\User_LDAP\User\Manager') ->setMethods(['getDeletedUser']) ->setConstructorArgs([ $this->configMock, diff --git a/apps/user_ldap/tests/access.php b/apps/user_ldap/tests/access.php index 6d35adf1694..e9789219177 100644 --- a/apps/user_ldap/tests/access.php +++ b/apps/user_ldap/tests/access.php @@ -45,13 +45,13 @@ class Test_Access extends \Test\TestCase { if(is_null($conMethods) || is_null($accMethods)) { $conMethods = get_class_methods('\OCA\user_ldap\lib\Connection'); $accMethods = get_class_methods('\OCA\user_ldap\lib\Access'); - $umMethods = get_class_methods('\OCA\user_ldap\lib\user\Manager'); + $umMethods = get_class_methods('\OCA\User_LDAP\User\Manager'); } $lw = $this->getMock('\OCA\user_ldap\lib\ILDAPWrapper'); $connector = $this->getMock('\OCA\user_ldap\lib\Connection', $conMethods, array($lw, null, null)); - $um = $this->getMock('\OCA\user_ldap\lib\user\Manager', + $um = $this->getMock('\OCA\User_LDAP\User\Manager', $umMethods, array( $this->getMock('\OCP\IConfig'), $this->getMock('\OCA\user_ldap\lib\FilesystemHelper'), @@ -244,7 +244,7 @@ class Test_Access extends \Test\TestCase { ->method('getNameByDN') ->will($this->returnValue('a_username')); - $userMock = $this->getMockBuilder('\OCA\user_ldap\lib\user\User') + $userMock = $this->getMockBuilder('\OCA\User_LDAP\User\User') ->disableOriginalConstructor() ->getMock(); diff --git a/apps/user_ldap/tests/integration/abstractintegrationtest.php b/apps/user_ldap/tests/integration/abstractintegrationtest.php index 10ce7378830..ff9bc9b46e7 100644 --- a/apps/user_ldap/tests/integration/abstractintegrationtest.php +++ b/apps/user_ldap/tests/integration/abstractintegrationtest.php @@ -24,7 +24,7 @@ namespace OCA\user_ldap\tests\integration; use OCA\user_ldap\lib\Access; use OCA\user_ldap\lib\Connection; use OCA\user_ldap\lib\LDAP; -use OCA\user_ldap\lib\user\Manager; +use OCA\User_LDAP\User\Manager; abstract class AbstractIntegrationTest { /** @var LDAP */ diff --git a/apps/user_ldap/tests/integration/fakemanager.php b/apps/user_ldap/tests/integration/fakemanager.php index 7d6ea0f3c13..6d67e98fb48 100644 --- a/apps/user_ldap/tests/integration/fakemanager.php +++ b/apps/user_ldap/tests/integration/fakemanager.php @@ -24,11 +24,11 @@ namespace OCA\user_ldap\tests\integration; /** * Class FakeManager * - * this is a mock of \OCA\user_ldap\lib\user\Manager which is a dependency of + * this is a mock of \OCA\User_LDAP\User\Manager which is a dependency of * Access, that pulls plenty more things in. Because it is not needed in the * scope of these tests, we replace it with a mock. */ -class FakeManager extends \OCA\user_ldap\lib\user\Manager { +class FakeManager extends \OCA\User_LDAP\User\Manager { public function __construct() { $this->ocConfig = \OC::$server->getConfig(); $this->image = new \OCP\Image(); diff --git a/apps/user_ldap/tests/integration/lib/integrationtestbackupserver.php b/apps/user_ldap/tests/integration/lib/integrationtestbackupserver.php index 9eabb5f2e7a..450032de9a7 100644 --- a/apps/user_ldap/tests/integration/lib/integrationtestbackupserver.php +++ b/apps/user_ldap/tests/integration/lib/integrationtestbackupserver.php @@ -21,7 +21,6 @@ namespace OCA\user_ldap\tests\integration\lib; -use OCA\user_ldap\lib\user\Manager as LDAPUserManager; use OCA\user_ldap\tests\integration\AbstractIntegrationTest; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User_LDAP; diff --git a/apps/user_ldap/tests/integration/lib/integrationtestconnect.php b/apps/user_ldap/tests/integration/lib/integrationtestconnect.php index b333552955a..e453c52b2ca 100644 --- a/apps/user_ldap/tests/integration/lib/integrationtestconnect.php +++ b/apps/user_ldap/tests/integration/lib/integrationtestconnect.php @@ -21,7 +21,7 @@ namespace OCA\user_ldap\tests\integration\lib; -use OCA\user_ldap\lib\user\Manager as LDAPUserManager; +use OCA\User_LDAP\User\Manager as LDAPUserManager; use OCA\user_ldap\tests\integration\AbstractIntegrationTest; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User_LDAP; diff --git a/apps/user_ldap/tests/integration/lib/integrationtestcountusersbyloginname.php b/apps/user_ldap/tests/integration/lib/integrationtestcountusersbyloginname.php index 83ed7e1b176..bf46cfeffa1 100644 --- a/apps/user_ldap/tests/integration/lib/integrationtestcountusersbyloginname.php +++ b/apps/user_ldap/tests/integration/lib/integrationtestcountusersbyloginname.php @@ -21,7 +21,7 @@ namespace OCA\user_ldap\tests\integration\lib; -use OCA\user_ldap\lib\user\Manager as LDAPUserManager; +use OCA\User_LDAP\User\Manager as LDAPUserManager; use OCA\user_ldap\tests\integration\AbstractIntegrationTest; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User_LDAP; diff --git a/apps/user_ldap/tests/integration/lib/integrationtestfetchusersbyloginname.php b/apps/user_ldap/tests/integration/lib/integrationtestfetchusersbyloginname.php index d7b7363b8a1..9713f26ba72 100644 --- a/apps/user_ldap/tests/integration/lib/integrationtestfetchusersbyloginname.php +++ b/apps/user_ldap/tests/integration/lib/integrationtestfetchusersbyloginname.php @@ -21,7 +21,7 @@ namespace OCA\user_ldap\tests\integration\lib; -use OCA\user_ldap\lib\user\Manager as LDAPUserManager; +use OCA\User_LDAP\User\Manager as LDAPUserManager; use OCA\user_ldap\tests\integration\AbstractIntegrationTest; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User_LDAP; diff --git a/apps/user_ldap/tests/integration/lib/integrationtestpaging.php b/apps/user_ldap/tests/integration/lib/integrationtestpaging.php index 2f7cc6a55a8..1de0a4d059b 100644 --- a/apps/user_ldap/tests/integration/lib/integrationtestpaging.php +++ b/apps/user_ldap/tests/integration/lib/integrationtestpaging.php @@ -21,7 +21,7 @@ namespace OCA\user_ldap\tests\integration\lib; -use OCA\user_ldap\lib\user\Manager as LDAPUserManager; +use OCA\User_LDAP\User\Manager as LDAPUserManager; use OCA\user_ldap\tests\integration\AbstractIntegrationTest; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User_LDAP; diff --git a/apps/user_ldap/tests/integration/lib/integrationtestuserhome.php b/apps/user_ldap/tests/integration/lib/integrationtestuserhome.php index 3d455608bf1..95a3f850a63 100644 --- a/apps/user_ldap/tests/integration/lib/integrationtestuserhome.php +++ b/apps/user_ldap/tests/integration/lib/integrationtestuserhome.php @@ -21,7 +21,7 @@ namespace OCA\user_ldap\tests\integration\lib; -use OCA\user_ldap\lib\user\Manager as LDAPUserManager; +use OCA\User_LDAP\User\Manager as LDAPUserManager; use OCA\user_ldap\tests\integration\AbstractIntegrationTest; use OCA\User_LDAP\Mapping\UserMapping; use OCA\User_LDAP\User_LDAP; diff --git a/apps/user_ldap/tests/integration/lib/user/IntegrationTestUserAvatar.php b/apps/user_ldap/tests/integration/lib/user/IntegrationTestUserAvatar.php index 4b220ff036e..65e026d6980 100644 --- a/apps/user_ldap/tests/integration/lib/user/IntegrationTestUserAvatar.php +++ b/apps/user_ldap/tests/integration/lib/user/IntegrationTestUserAvatar.php @@ -20,7 +20,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ -use OCA\user_ldap\lib\user\User; + +use OCA\User_LDAP\User\User; use OCA\User_LDAP\Mapping\UserMapping; use OCA\user_ldap\tests\integration\AbstractIntegrationTest; @@ -118,7 +119,7 @@ class IntegrationTestUserAvatar extends AbstractIntegrationTest { } protected function initUserManager() { - $this->userManager = new \OCA\user_ldap\lib\user\Manager( + $this->userManager = new \OCA\User_LDAP\User\Manager( \OC::$server->getConfig(), new \OCA\user_ldap\lib\FilesystemHelper(), new \OCA\user_ldap\lib\LogWrapper(), diff --git a/apps/user_ldap/tests/integration/lib/user/IntegrationTestUserDisplayName.php b/apps/user_ldap/tests/integration/lib/user/IntegrationTestUserDisplayName.php index 6f021e61f6e..d1c048b4d25 100644 --- a/apps/user_ldap/tests/integration/lib/user/IntegrationTestUserDisplayName.php +++ b/apps/user_ldap/tests/integration/lib/user/IntegrationTestUserDisplayName.php @@ -18,7 +18,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ -use OCA\user_ldap\lib\user\User; + +use OCA\User_LDAP\User\User; use OCA\User_LDAP\Mapping\UserMapping; use OCA\user_ldap\tests\integration\AbstractIntegrationTest; diff --git a/apps/user_ldap/tests/jobs/cleanup.php b/apps/user_ldap/tests/jobs/cleanup.php index 8a577f37233..f19c7cd8858 100644 --- a/apps/user_ldap/tests/jobs/cleanup.php +++ b/apps/user_ldap/tests/jobs/cleanup.php @@ -30,7 +30,7 @@ class Test_CleanUp extends \PHPUnit_Framework_TestCase { ->disableOriginalConstructor() ->getMock(); $mocks['deletedUsersIndex'] = - $this->getMockBuilder('\OCA\user_ldap\lib\user\deletedUsersIndex') + $this->getMockBuilder('\OCA\User_LDAP\User\DeletedUsersIndex') ->disableOriginalConstructor() ->getMock(); $mocks['ocConfig'] = $this->getMock('\OCP\IConfig'); diff --git a/apps/user_ldap/tests/wizard.php b/apps/user_ldap/tests/wizard.php index c247718c2a3..a73292db354 100644 --- a/apps/user_ldap/tests/wizard.php +++ b/apps/user_ldap/tests/wizard.php @@ -70,7 +70,7 @@ class Test_Wizard extends \Test\TestCase { $connector = $this->getMock('\OCA\user_ldap\lib\Connection', $connMethods, array($lw, null, null)); - $um = $this->getMockBuilder('\OCA\user_ldap\lib\user\Manager') + $um = $this->getMockBuilder('\OCA\User_LDAP\User\Manager') ->disableOriginalConstructor() ->getMock(); $access = $this->getMock('\OCA\user_ldap\lib\Access', |