19 declare(strict_types=1);
21 require_once(__DIR__ .
"/../../../../libs/composer/vendor/autoload.php");
22 require_once(__DIR__ .
"/../../Base.php");
36 $this->createMock(
C\Modal\InterruptiveItem\Factory::class),
37 $this->createMock(FieldFactory::class),
40 protected C\Modal\InterruptiveItem\
Factory $item_factory,
45 public function modal(): C\Modal\Factory
47 return new I\Component\Modal\Factory(
53 public function button(): C\Button\Factory
55 return new I\Component\Button\Factory();
62 return new I\Component\Player\Factory();
69 $video =
$f->video(
"/foo");
71 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Player\\Video", $video);
78 $video =
$f->video(
"/foo");
80 $this->assertEquals(
"/foo", $video->getSource());
87 $video =
$f->video(
"/foo")->withPoster(
"bar.jpg");
89 $this->assertEquals(
"bar.jpg", $video->getPoster());
96 $video =
$f->video(
"/foo")->withAdditionalSubtitleFile(
"en",
"subtitles.vtt");
98 $this->assertEquals([
"en" =>
"subtitles.vtt"], $video->getSubtitleFiles());
106 $video =
$f->video(
"/foo");
108 $html =
$r->render($video);
110 <div
class=
"il-video-container">
111 <video
class=
"il-video-player" id=
"id_1" src=
"/foo" style=
"max-width: 100%;" preload=
"metadata" >
126 $video =
$f->video(
"/foo")->withPoster(
"bar.jpg");
128 $html =
$r->render($video);
131 <div
class=
"il-video-container">
132 <video
class=
"il-video-player" id=
"id_1" src=
"/foo" style=
"max-width: 100%;" preload=
"metadata" poster=
"bar.jpg">
147 $video =
$f->video(
"/foo")->withAdditionalSubtitleFile(
"en",
"subtitles.vtt");
149 $html =
$r->render($video);
151 <div
class=
"il-video-container">
152 <video
class=
"il-video-player" id=
"id_1" src=
"/foo" style=
"max-width: 100%;" preload=
"metadata" >
153 <track kind=
"subtitles" src=
"subtitles.vtt" srclang=
"en" />
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
button(string $caption, string $cmd)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
testRenderWithSubtitles()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
brutallyTrimHTML(string $html)
A more radical version of normalizeHTML.
assertHTMLEquals(string $expected_html_as_string, string $html_as_string)
Provides common functionality for UI tests.
modal(string $title="", string $cancel_label="")
testGetTitleGetSubtitleFile()
testImplementsFactoryInterface()