mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-07 07:44:27 +02:00
Merge branch 'develop' into eventdispatcher-part3
This commit is contained in:
commit
ea172010f8
91 changed files with 821 additions and 799 deletions
|
@ -17,16 +17,16 @@ class SyslogLoggerFactoryWrapper extends SyslogLogger
|
|||
{
|
||||
public function create(IManageConfigValues $config): LoggerInterface
|
||||
{
|
||||
$logOpts = $config->get('system', 'syslog_flags') ?? SyslogLoggerClass::DEFAULT_FLAGS;
|
||||
$logFacility = $config->get('system', 'syslog_facility') ?? SyslogLoggerClass::DEFAULT_FACILITY;
|
||||
$logOpts = (int) $config->get('system', 'syslog_flags') ?? SyslogLoggerClass::DEFAULT_FLAGS;
|
||||
$logFacility = (int) $config->get('system', 'syslog_facility') ?? SyslogLoggerClass::DEFAULT_FACILITY;
|
||||
$loglevel = SyslogLogger::mapLegacyConfigDebugLevel($config->get('system', 'loglevel'));
|
||||
|
||||
if (array_key_exists($loglevel, SyslogLoggerClass::logLevels)) {
|
||||
$loglevel = SyslogLoggerClass::logLevels[$loglevel];
|
||||
} else {
|
||||
if (!array_key_exists($loglevel, SyslogLoggerClass::logLevels)) {
|
||||
throw new LogLevelException(sprintf('The level "%s" is not valid.', $loglevel));
|
||||
}
|
||||
|
||||
$loglevel = SyslogLoggerClass::logLevels[$loglevel];
|
||||
|
||||
return new SyslogLoggerWrapper($this->channel, $this->introspection, $loglevel, $logOpts, $logFacility);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ class SyslogLoggerWrapper extends SyslogLogger
|
|||
{
|
||||
private $content;
|
||||
|
||||
public function __construct(string $channel, IHaveCallIntrospections $introspection, string $logLevel, string $logOptions, string $logFacility)
|
||||
public function __construct(string $channel, IHaveCallIntrospections $introspection, int $logLevel, int $logOptions, int $logFacility)
|
||||
{
|
||||
parent::__construct($channel, $introspection, $logLevel, $logOptions, $logFacility);
|
||||
|
||||
|
|
|
@ -152,13 +152,13 @@ class UserSessionTest extends MockedTestCase
|
|||
'data' => [
|
||||
'remote' => ['3' => '21'],
|
||||
],
|
||||
'expected' => false,
|
||||
'expected' => 0,
|
||||
],
|
||||
'empty' => [
|
||||
'cid' => 21,
|
||||
'data' => [
|
||||
],
|
||||
'expected' => false,
|
||||
'expected' => 0,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ class UserSessionTest extends MockedTestCase
|
|||
public function testGetUserIdForVisitorContactID(int $cid, array $data, $expected)
|
||||
{
|
||||
$userSession = new UserSession(new ArraySession($data));
|
||||
$this->assertEquals($expected, $userSession->getUserIDForVisitorContactID($cid));
|
||||
$this->assertSame($expected, $userSession->getUserIDForVisitorContactID($cid));
|
||||
}
|
||||
|
||||
public function dataAuthenticated()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue