19declare(strict_types=1);
24use ILIAS\LegalDocuments\test\ContainerMock;
27use PHPUnit\Framework\TestCase;
31require_once __DIR__ .
'/../ContainerMock.php';
39 $this->assertInstanceOf(PageContent::class,
new PageContent(
'foo', []));
44 $template = $this->mock(ilGlobalTemplateInterface::class);
45 $template->expects(self::once())->method(
'setTitle')->with(
'foo');
46 $components = [$this->mock(Component::class), $this->mock(Component::class)];
50 $this->assertSame(
'rendered', $instance->render($template,
$renderer));
56 $this->assertInstanceOf(ShowOnScreenMessage::class, $instance->withOnScreenMessage(
'foo',
'bar',
true));
testWithOnScreenMessage()
A component is the most general form of an entity in the UI.
An entity that renders components to a string output.