public function testUncallableHandlersAreLogged()
{
$hooks = new \Elgg\PluginHooksService();
$loggerMock = $this->getMock('\\Elgg\\Logger', array(), array(), '', false);
$hooks->setLogger($loggerMock);
$hooks->registerHandler('foo', 'bar', array(new \stdClass(), 'uncallableMethod'));
$expectedMsg = 'handler for plugin hook [foo, bar] is not callable: (stdClass)->uncallableMethod';
$loggerMock->expects($this->once())->method('warn')->with($expectedMsg);
$hooks->trigger('foo', 'bar');
}