◆ getComponentRendererFSLoader()
ComponentRendererFSLoaderTest::getComponentRendererFSLoader |
( |
| ) |
|
|
protected |
Definition at line 17 of file ComponentRendererFSLoaderTest.php.
References ILIAS\UI\Implementation\Render\FSLoader\$default_renderer_factory, and $lng.
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);
◆ test_getRenderer_successfully()
ComponentRendererFSLoaderTest::test_getRenderer_successfully |
( |
| ) |
|
◆ test_getRenderer_uses_RendererFactory()
ComponentRendererFSLoaderTest::test_getRenderer_uses_RendererFactory |
( |
| ) |
|
Definition at line 35 of file ComponentRendererFSLoaderTest.php.
References $factory, and $loader.
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);
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);
The documentation for this class was generated from the following file: