19declare(strict_types=1);
21use PHPUnit\Framework\TestCase;
35 ->onlyMethods([
"getRendererFor",
"getRendererFactoryFor"])
39 ->onlyMethods([
"registerResources",
"render"])
41 $component = $this->getMockBuilder(Component::class)->getMock();
44 ->expects($this->once())
45 ->method(
"getRendererFor")
49 $registry = $this->getMockBuilder(ResourceRegistry::class)
53 $r = $l->getRendererFor($component,
$context);
61 ->onlyMethods([
"getRendererFor",
"getRendererFactoryFor"])
65 ->onlyMethods([
"registerResources",
"render"])
67 $component = $this->getMockBuilder(Component::class)->getMock();
69 ->expects($this->once())
70 ->method(
"getRendererFor")
71 ->with($component, [])
74 $registry = $this->getMockBuilder(ResourceRegistry::class)
78 ->expects($this->once())
79 ->method(
"registerResources")
83 $l->getRendererFor($component, []);
89 ->onlyMethods([
"getRendererFor",
"getRendererFactoryFor"])
92 $c1 = $this->createMock(Component::class);
94 $factory = $this->createMock(RendererFactory::class);
96 ->expects($this->exactly(1))
97 ->method(
"getRendererFactoryFor")
99 ->willReturn($factory);
103 $this->assertSame($factory, $l->getRendererFactoryFor($c1));
testPassthroughGetRendererFactory()
testForwardsFromUnderlying()
Caches renderers loaded by another loader.
Registers resources for retreived renderers at a ResourceRegistry.
A component is the most general form of an entity in the UI.
An entity that renders components to a string output.
Loads renderers for components.
This is the interface that components should use if they want to load specific renderers.
Registry for resources required by rendered output like Javascript or CSS.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.