5require_once(__DIR__ . 
"/TestComponent.php");
 
   11        return $this->instantiateRendererFor($class);
 
   19        $ui_factory = $this->getMockBuilder(
ILIAS\
UI\Factory::class)->getMock();
 
   20        $tpl_factory = $this->getMockBuilder(
ILIAS\
UI\Implementation\Render\TemplateFactory::class)->getMock();
 
   21        $lng = $this->getMockBuilder(\ilLanguage::class)->disableOriginalConstructor()->getMock();
 
   22        $js_binding = $this->getMockBuilder(
ILIAS\
UI\Implementation\Render\JavaScriptBinding::class)->getMock();
 
   23        $default_renderer_factory = new \ILIAS\UI\Implementation\Render\DefaultRendererFactory($ui_factory, $tpl_factory, 
$lng, $js_binding);
 
   31        $r = $f->getRendererFor(
new \
ILIAS\
UI\Implementation\Component\Glyph\Glyph(
"up", 
"up"), []);
 
   32        $this->assertInstanceOf(\
ILIAS\
UI\Implementation\Render\ComponentRenderer::class, 
$r);
 
   37        $loader = $this->getMockBuilder(
ILIAS\
UI\Implementation\Render\FSLoader::class)
 
   38            ->setMethods([
"getRendererFactoryFor", 
"getContextNames"])
 
   39            ->disableOriginalConstructor()
 
   41        $factory = $this->getMockBuilder(
ILIAS\
UI\Implementation\RendererFactory::class)
 
   42            ->setMethods([
"getRendererInContext"])
 
   45        $rendered_component = $this->createMock(
ILIAS\
UI\Component\Component::class);
 
   47        $component1 = $this->createMock(
ILIAS\
UI\Component\Component::class);
 
   48        $component2 = $this->createMock(
ILIAS\
UI\Component\Component::class);
 
   49        $component_name1 = 
"COMPONENT 1";
 
   50        $component_name2 = 
"COMPONENT 2";
 
   53            ->expects($this->once())
 
   54            ->method(
"getContextNames")
 
   55            ->with([$component1, $component2])
 
   56            ->willReturn([$component_name1, $component_name2]);
 
   59            ->expects($this->once())
 
   60            ->method(
"getRendererFactoryFor")
 
   61            ->with($rendered_component)
 
   64        $renderer = 
"RENDERER";
 
   66            ->expects($this->once())
 
   67            ->method(
"getRendererInContext")
 
   68            ->with($rendered_component, [$component_name1, $component_name2])
 
   69            ->willReturn($renderer);
 
   71        $renderer2 = 
$loader->getRendererFor($rendered_component, [$component1, $component2]);
 
   72        $this->assertEquals($renderer, $renderer2);
 
An exception for terminatinating execution or to throw for unit testing.
test_getRenderer_successfully()
getComponentRendererFSLoader()
test_getRenderer_uses_RendererFactory()
_instantiateRendererFor($class)
Loads renderers for components from the file system.