27 foreach ($loggersToAdd as $loggerToAdd) {
28 Registry::addLogger($loggerToAdd);
30 foreach ($loggersToCheck as
$index => $loggerToCheck) {
31 $this->assertSame($expectedResult[
$index], Registry::hasLogger($loggerToCheck));
37 $logger1 =
new Logger(
'test1');
38 $logger2 =
new Logger(
'test2');
39 $logger3 =
new Logger(
'test3');
45 array($logger1, $logger2),
51 array(
'test1',
'test2'),
56 array($logger1, $logger2),
57 array(
'test1', $logger2,
'test3', $logger3),
58 array(
true,
true,
false,
false),
68 Registry::addLogger(
new Logger(
'test1'),
'log');
71 $this->setExpectedException(
'\InvalidArgumentException');
72 Registry::getInstance(
'log');
82 Registry::addLogger($loggerToAdd);
83 Registry::removeLogger($remove);
85 $this->setExpectedException(
'\InvalidArgumentException');
86 Registry::getInstance($loggerToAdd->getName());
91 $logger1 =
new Logger(
'test1');
94 array($logger1, $logger1),
95 array($logger1,
'test1'),
106 $logger1 =
new Logger(
'test1');
107 $logger2 =
new Logger(
'test2');
109 Registry::addLogger($logger1,
'test1');
110 Registry::addLogger($logger2);
112 $this->assertSame($logger1, Registry::getInstance(
'test1'));
113 $this->assertSame($logger2, Registry::test2());
122 Registry::getInstance(
'test1');
130 $log1 =
new Logger(
'test1');
131 $log2 =
new Logger(
'test2');
133 Registry::addLogger($log1,
'log');
135 Registry::addLogger($log2,
'log',
true);
137 $this->assertSame($log2, Registry::getInstance(
'log'));
146 $log1 =
new Logger(
'test1');
147 $log2 =
new Logger(
'test2');
149 Registry::addLogger($log1,
'log');
151 Registry::addLogger($log2,
'log');
testFailsOnUnspecifiedReplacement()
Monolog::addLogger
testClearClears()
Monolog::clear
testHasLogger(array $loggersToAdd, array $loggersToCheck, array $expectedResult)
hasLoggerProvider Monolog::hasLogger
testReplacesLogger()
Monolog::addLogger
Create styles array
The data for the language used.
testRemovesLogger($loggerToAdd, $remove)
removedLoggerProvider Monolog::addLogger Monolog::removeLogger
testGetsSameLogger()
Monolog::addLogger Monolog::getInstance Monolog::__callStatic
testFailsOnNonExistantLogger()
Monolog::getInstance