1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 05:07:36 +02:00

Add name length check to the HipChatHandler

As explained in its docblock, the validation function will fall back to
a simple strlen check if mb_strlen is not available. However, that very
specific case is not one that was deemed important to support, as anyone
using UTF-8 in their code, without having mbstring available will
probably have bigger problems to worry about.

Fixes #289
This commit is contained in:
Milos Levacic
2013-12-24 21:15:02 +01:00
parent c9db00f882
commit 67a908796b
2 changed files with 39 additions and 0 deletions

View File

@@ -156,4 +156,12 @@ class HipChatHandlerTest extends TestCase
$this->handler->setFormatter($this->getIdentityFormatter());
}
/**
* @expectedException InvalidArgumentException
*/
public function testCreateWithTooLongName()
{
$hipChatHandler = new \Monolog\Handler\HipChatHandler('token', 'room', 'SixteenCharsHere');
}
}