Move LogWrapper to PSR-4

remotes/origin/stand-alone-job-executer
Joas Schilling 2016-05-12 16:16:06 +07:00
parent e73d811425
commit 6feccccbd5
No known key found for this signature in database
GPG Key ID: 70A0B324C41C0946
13 changed files with 17 additions and 16 deletions

@ -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(),

@ -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,

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

@ -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;

@ -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

@ -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;

@ -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(),

@ -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');

@ -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');

@ -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'),

@ -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'),

@ -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);

@ -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(),