Browse Source

Move LogWrapper to PSR-4

remotes/origin/stand-alone-job-executer
Joas Schilling 10 years ago
parent
commit
6feccccbd5
No known key found for this signature in database GPG Key ID: 70A0B324C41C0946
  1. 2
      apps/user_ldap/ajax/wizard.php
  2. 2
      apps/user_ldap/appinfo/app.php
  3. 2
      apps/user_ldap/lib/LogWrapper.php
  4. 1
      apps/user_ldap/lib/Proxy.php
  5. 4
      apps/user_ldap/lib/User/Manager.php
  6. 2
      apps/user_ldap/lib/User/User.php
  7. 3
      apps/user_ldap/lib/jobs.php
  8. 2
      apps/user_ldap/tests/User/ManagerTest.php
  9. 2
      apps/user_ldap/tests/User/UserTest.php
  10. 2
      apps/user_ldap/tests/User_LDAPTest.php
  11. 2
      apps/user_ldap/tests/access.php
  12. 7
      apps/user_ldap/tests/integration/lib/integrationtestuserhome.php
  13. 2
      apps/user_ldap/tests/integration/lib/user/IntegrationTestUserAvatar.php

2
apps/user_ldap/ajax/wizard.php

@ -52,7 +52,7 @@ $con->setIgnoreValidation(true);
$userManager = new \OCA\User_LDAP\User\Manager(
\OC::$server->getConfig(),
new \OCA\user_ldap\lib\FilesystemHelper(),
new \OCA\user_ldap\lib\LogWrapper(),
new \OCA\User_LDAP\LogWrapper(),
\OC::$server->getAvatarManager(),
new \OCP\Image(),
\OC::$server->getDatabaseConnection(),

2
apps/user_ldap/appinfo/app.php

@ -35,7 +35,7 @@ if(count($configPrefixes) === 1) {
$dbc = \OC::$server->getDatabaseConnection();
$userManager = new OCA\User_LDAP\User\Manager($ocConfig,
new OCA\user_ldap\lib\FilesystemHelper(),
new OCA\user_ldap\lib\LogWrapper(),
new OCA\User_LDAP\LogWrapper(),
\OC::$server->getAvatarManager(),
new \OCP\Image(),
$dbc,

2
apps/user_ldap/lib/logwrapper.php → apps/user_ldap/lib/LogWrapper.php

@ -20,7 +20,7 @@
*
*/
namespace OCA\user_ldap\lib;
namespace OCA\User_LDAP;
/**
* @brief wraps around static ownCloud core methods

1
apps/user_ldap/lib/Proxy.php

@ -32,7 +32,6 @@ use OCA\user_ldap\lib\Access;
use OCA\user_ldap\lib\Connection;
use OCA\user_ldap\lib\FilesystemHelper;
use OCA\user_ldap\lib\ILDAPWrapper;
use OCA\user_ldap\lib\LogWrapper;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\Mapping\GroupMapping;

4
apps/user_ldap/lib/User/Manager.php

@ -25,7 +25,7 @@
namespace OCA\User_LDAP\User;
use OCA\user_ldap\lib\LogWrapper;
use OCA\User_LDAP\LogWrapper;
use OCA\user_ldap\lib\FilesystemHelper;
use OCP\IAvatarManager;
use OCP\IConfig;
@ -75,7 +75,7 @@ class Manager {
* @param IConfig $ocConfig
* @param \OCA\user_ldap\lib\FilesystemHelper $ocFilesystem object that
* gives access to necessary functions from the OC filesystem
* @param \OCA\user_ldap\lib\LogWrapper $ocLog
* @param \OCA\User_LDAP\LogWrapper $ocLog
* @param IAvatarManager $avatarManager
* @param Image $image an empty image instance
* @param IDBConnection $db

2
apps/user_ldap/lib/User/User.php

@ -26,7 +26,7 @@ namespace OCA\User_LDAP\User;
use OCA\user_ldap\lib\Connection;
use OCA\user_ldap\lib\FilesystemHelper;
use OCA\user_ldap\lib\LogWrapper;
use OCA\User_LDAP\LogWrapper;
use OCP\IAvatarManager;
use OCP\IConfig;
use OCP\Image;

3
apps/user_ldap/lib/jobs.php

@ -30,6 +30,7 @@ namespace OCA\user_ldap\lib;
use OCA\User_LDAP\Mapping\GroupMapping;
use OCA\User_LDAP\Mapping\UserMapping;
use OCA\User_LDAP\User\Manager;
class Jobs extends \OC\BackgroundJob\TimedJob {
static private $groupsFromDB;
@ -170,7 +171,7 @@ class Jobs extends \OC\BackgroundJob\TimedJob {
if(count($configPrefixes) === 1) {
//avoid the proxy when there is only one LDAP server configured
$dbc = \OC::$server->getDatabaseConnection();
$userManager = new user\Manager(
$userManager = new Manager(
\OC::$server->getConfig(),
new FilesystemHelper(),
new LogWrapper(),

2
apps/user_ldap/tests/User/ManagerTest.php

@ -40,7 +40,7 @@ class ManagerTest extends \Test\TestCase {
$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');
$log = $this->getMock('\OCA\User_LDAP\LogWrapper');
$avaMgr = $this->getMock('\OCP\IAvatarManager');
$image = $this->getMock('\OCP\Image');
$dbc = $this->getMock('\OCP\IDBConnection');

2
apps/user_ldap/tests/User/UserTest.php

@ -40,7 +40,7 @@ class UserTest extends \Test\TestCase {
$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');
$log = $this->getMock('\OCA\User_LDAP\LogWrapper');
$avaMgr = $this->getMock('\OCP\IAvatarManager');
$image = $this->getMock('\OCP\Image');
$dbc = $this->getMock('\OCP\IDBConnection');

2
apps/user_ldap/tests/User_LDAPTest.php

@ -81,7 +81,7 @@ class User_LDAPTest extends \Test\TestCase {
->setConstructorArgs([
$this->configMock,
$this->getMock('\OCA\user_ldap\lib\FilesystemHelper'),
$this->getMock('\OCA\user_ldap\lib\LogWrapper'),
$this->getMock('\OCA\User_LDAP\LogWrapper'),
$this->getMock('\OCP\IAvatarManager'),
$this->getMock('\OCP\Image'),
$this->getMock('\OCP\IDBConnection'),

2
apps/user_ldap/tests/access.php

@ -55,7 +55,7 @@ class Test_Access extends \Test\TestCase {
$umMethods, array(
$this->getMock('\OCP\IConfig'),
$this->getMock('\OCA\user_ldap\lib\FilesystemHelper'),
$this->getMock('\OCA\user_ldap\lib\LogWrapper'),
$this->getMock('\OCA\User_LDAP\LogWrapper'),
$this->getMock('\OCP\IAvatarManager'),
$this->getMock('\OCP\Image'),
$this->getMock('\OCP\IDBConnection'),

7
apps/user_ldap/tests/integration/lib/integrationtestuserhome.php

@ -67,10 +67,11 @@ class IntegrationTestUserHome extends AbstractIntegrationTest {
$this->userManager = new LDAPUserManager(
\OC::$server->getConfig(),
new \OCA\user_ldap\lib\FilesystemHelper(),
new \OCA\user_ldap\lib\LogWrapper(),
new \OCA\User_LDAP\LogWrapper(),
\OC::$server->getAvatarManager(),
new \OCP\Image(),
\OC::$server->getDatabaseConnection()
\OC::$server->getDatabaseConnection(),
\OC::$server->getUserManager()
);
}
@ -82,7 +83,7 @@ class IntegrationTestUserHome extends AbstractIntegrationTest {
*/
protected function case1() {
\OC::$server->getConfig()->setAppValue('user_ldap', 'enforce_home_folder_naming_rule', false);
$userManager = \oc::$server->getUserManager();
$userManager = \OC::$server->getUserManager();
$userManager->clearBackends();
$userManager->registerBackend($this->backend);
$users = $userManager->search('', 5, 0);

2
apps/user_ldap/tests/integration/lib/user/IntegrationTestUserAvatar.php

@ -122,7 +122,7 @@ class IntegrationTestUserAvatar extends AbstractIntegrationTest {
$this->userManager = new \OCA\User_LDAP\User\Manager(
\OC::$server->getConfig(),
new \OCA\user_ldap\lib\FilesystemHelper(),
new \OCA\user_ldap\lib\LogWrapper(),
new \OCA\User_LDAP\LogWrapper(),
\OC::$server->getAvatarManager(),
new \OCP\Image(),
\OC::$server->getDatabaseConnection(),

Loading…
Cancel
Save