19 declare(strict_types=1);
26 require_once(
"vendor/composer/vendor/autoload.php");
27 require_once(__DIR__ .
"/../../Base.php");
39 public function setUp(): void
45 public function testRendering(): void
47 $mode_title =
'That\'s one small step for [a] man';
48 $uri_string =
'http://one_giant_leap?for=mankind';
49 $mode_info =
new ModeInfo($mode_title,
new URI($uri_string));
51 $r = $this->getDefaultRenderer();
52 $html =
$r->render($mode_info);
55 <div
class=
"c-mode-info__pageframe"></div>
56 <div
class=
"c-mode-info">
57 <div
class=
"c-mode-info__content">
58 <div
class=
"c-mode-info__label">$mode_title</div>
60 <div
class=
"c-mode-info__close">
61 <a tabindex=
"0" class=
"glyph" href=
"$uri_string" aria-label=
"close"><span
class=
"glyphicon glyphicon-remove" aria-hidden=
"true"></span></a>
66 <div
class=
"c-mode-info__mobile-padding"></div>
70 $this->brutallyTrimHTML($expected),
71 $this->brutallyTrimHTML($html)
75 public function testData(): void
77 $mode_title =
'That\'s one small step for [a] man';
78 $uri_string =
'http://one_giant_leap?for=mankind';
80 $mode_info = $this->getUIFactory()->mainControls()->modeInfo($mode_title,
new URI($uri_string));
82 $this->assertInstanceOf(\
ILIAS\
UI\
Component\MainControls\ModeInfo::class, $mode_info);
83 $this->assertEquals($mode_title, $mode_info->getModeTitle());
86 $mode_info->getCloseAction()->getBaseURI() .
'?' . $mode_info->getCloseAction()->getQuery()
111 return new \ILIAS\UI\Implementation\Component\MainControls\Factory(
121 $factory->sig_gen = $this->sig_gen;
Interface Observer Contains several chained tasks and infos about them.
__construct(Container $dic, ilPlugin $plugin)