◆ test_forwards_from_underlying()
ComponentRendererLoaderResourceRegistryWrapperTest::test_forwards_from_underlying |
( |
| ) |
|
Definition at line 8 of file ComponentRendererLoaderResourceRegistryWrapperTest.php.
References $l, and $r.
10 $underlying = $this->getMockBuilder(\
ILIAS\
UI\Implementation\Render\Loader::class)
11 ->setMethods([
"getRendererFor",
"getRendererFactoryFor"])
14 $renderer = $this->getMockBuilder(\
ILIAS\
UI\Implementation\Render\ComponentRenderer::class)
15 ->setMethods([
"registerResources",
"render"])
17 $component = $this->getMockBuilder(\
ILIAS\
UI\
Component\Component::class)->getMock();
18 $context = [
"a",
"b"];
20 ->expects($this->once())
21 ->method(
"getRendererFor")
22 ->with($component, $context)
23 ->willReturn($renderer);
25 $registry = $this->getMockBuilder(\
ILIAS\
UI\Implementation\Render\ResourceRegistry::class)
28 $l = new \ILIAS\UI\Implementation\Render\LoaderResourceRegistryWrapper($registry, $underlying);
29 $r =
$l->getRendererFor($component, $context);
31 $this->assertSame($renderer,
$r);
◆ test_passthrough_getRendererFactory()
ComponentRendererLoaderResourceRegistryWrapperTest::test_passthrough_getRendererFactory |
( |
| ) |
|
Definition at line 62 of file ComponentRendererLoaderResourceRegistryWrapperTest.php.
References $factory, and $l.
64 $underlying = $this->getMockBuilder(\
ILIAS\
UI\Implementation\Render\Loader::class)
65 ->setMethods([
"getRendererFor",
"getRendererFactoryFor"])
72 ->expects($this->exactly(1))
73 ->method(
"getRendererFactoryFor")
77 $l = new \ILIAS\UI\Implementation\Render\LoaderCachingWrapper($underlying);
79 $this->assertSame(
$factory,
$l->getRendererFactoryFor($c1));
◆ test_registerResources()
ComponentRendererLoaderResourceRegistryWrapperTest::test_registerResources |
( |
| ) |
|
Definition at line 34 of file ComponentRendererLoaderResourceRegistryWrapperTest.php.
References $l, and $r.
36 $underlying = $this->getMockBuilder(\
ILIAS\
UI\Implementation\Render\Loader::class)
37 ->setMethods([
"getRendererFor",
"getRendererFactoryFor"])
40 $renderer = $this->getMockBuilder(\
ILIAS\
UI\Implementation\Render\ComponentRenderer::class)
41 ->setMethods([
"registerResources",
"render"])
43 $component = $this->getMockBuilder(\
ILIAS\
UI\
Component\Component::class)->getMock();
45 ->expects($this->once())
46 ->method(
"getRendererFor")
47 ->with($component, [])
48 ->willReturn($renderer);
50 $registry = $this->getMockBuilder(\
ILIAS\
UI\Implementation\Render\ResourceRegistry::class)
54 ->expects($this->once())
55 ->method(
"registerResources")
58 $l = new \ILIAS\UI\Implementation\Render\LoaderResourceRegistryWrapper($registry, $underlying);
59 $r =
$l->getRendererFor($component, []);
The documentation for this class was generated from the following file: