public function testThrowsExceptionOnInvalidHookHandlerReturnForIconFile()
{
$callback = function ($hook, $type, $icon, $params) {
return '/path/to/foo.jpg';
};
$this->hooks->registerHandler('entity:icon:file', 'object', $callback);
$service = $this->createService();
$service->getIcon($this->entity, 'small');
}