19 declare(strict_types=1);
44 $container = $this->getMockBuilder(Container::class)->disableOriginalConstructor()->getMock();
45 $tile = $this->getMockBuilder(Tile::class)->disableOriginalConstructor()->getMock();
46 $head = $this->getMockBuilder(PresentationHeader::class)->disableOriginalConstructor()->getMock();
49 $this->assertInstanceOf(TileView::class, $tile);
54 $request = $this->getMockBuilder(ServerRequest::class)->disableOriginalConstructor()->getMock();
55 $request->method(
'getQueryParams')->willReturn([]);
57 $http = $this->getMockBuilder(Services::class)->disableOriginalConstructor()->getMock();
58 $http->method(
'request')->willReturn($request);
60 $user = $this->getMockBuilder(ilObjUser::class)->disableOriginalConstructor()->getMock();
62 $deck = $this->getMockBuilder(Deck::class)->disableOriginalConstructor()->getMock();
64 $sortation = $this->getMockBuilder(Sortation::class)->disableOriginalConstructor()->getMock();
65 $sortation->method(
'withTargetURL')->willReturn($sortation);
67 $view_control = $this->getMockBuilder(ViewControl::class)->disableOriginalConstructor()->getMock();
68 $view_control->method(
'sortation')->willReturn($sortation);
70 $factory = $this->getMockBuilder(UI::class)->disableOriginalConstructor()->getMock();
71 $factory->method(
'deck')->willReturn($deck);
72 $factory->method(
'viewControl')->willReturn($view_control);
74 $renderer = $this->getMockBuilder(Renderer::class)->disableOriginalConstructor()->getMock();
75 $renderer->method(
'render')->willReturn(
'');
77 $ui = $this->getMockBuilder(UIServices::class)->disableOriginalConstructor()->getMock();
78 $ui->method(
'factory')->willReturn($factory);
79 $ui->method(
'renderer')->willReturn(
$renderer);
81 $ctrl = $this->getMockBuilder(ilCtrl::class)->disableOriginalConstructor()->getMock();
83 $language = $this->getMockBuilder(ilLanguage::class)->disableOriginalConstructor()->getMock();
84 $language->method(
'txt')->willReturnCallback(
static fn(
string $name):
string => $name);
86 $container = $this->getMockBuilder(Container::class)->disableOriginalConstructor()->getMock();
91 $container->method(
'language')->willReturn($language);
93 $tile = $this->getMockBuilder(Tile::class)->disableOriginalConstructor()->getMock();
94 $head = $this->getMockBuilder(PresentationHeader::class)->disableOriginalConstructor()->getMock();
96 $assignments_of_user =
static fn() => [];
99 $this->assertEquals(
'', $tile->show());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This is how the factory for UI elements looks.