1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-12 16:14:08 +02:00

Merge branch '1.x'

This commit is contained in:
Jordi Boggiano
2019-11-12 21:50:28 +01:00
19 changed files with 262 additions and 210 deletions

View File

@@ -48,6 +48,22 @@ EOF;
$this->assertEquals($expected, $this->generateScript());
}
public function testStylingMultiple()
{
$handler = new BrowserConsoleHandler();
$handler->setFormatter($this->getIdentityFormatter());
$handler->handle($this->getRecord(Logger::DEBUG, 'foo[[bar]]{color: red}[[baz]]{color: blue}'));
$expected = <<<EOF
(function (c) {if (c && c.groupCollapsed) {
c.log("%cfoo%cbar%c%cbaz%c", "font-weight: normal", "color: red", "font-weight: normal", "color: blue", "font-weight: normal");
}})(console);
EOF;
$this->assertEquals($expected, $this->generateScript());
}
public function testEscaping()
{
$handler = new BrowserConsoleHandler();