3 declare(strict_types=1);
21 require_once(__DIR__ .
"/../../../../libs/composer/vendor/autoload.php");
22 require_once(__DIR__ .
"/../../Base.php");
35 $field_factory = $this->createMock(FieldFactory::class);
36 return new class ($field_factory) extends
NoUIFactory {
42 public function modal(): C\Modal\Factory
44 return new I\Component\Modal\Factory(
new I\
Component\SignalGenerator(), $this->factory);
46 public function button(): C\Button\Factory
48 return new I\Component\Button\Factory();
55 return new I\Component\Player\Factory();
62 $video =
$f->video(
"/foo");
64 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Player\\Video", $video);
71 $video =
$f->video(
"/foo");
73 $this->assertEquals(
"/foo", $video->getSource());
80 $video =
$f->video(
"/foo")->withPoster(
"bar.jpg");
82 $this->assertEquals(
"bar.jpg", $video->getPoster());
89 $video =
$f->video(
"/foo")->withAdditionalSubtitleFile(
"en",
"subtitles.vtt");
91 $this->assertEquals([
"en" =>
"subtitles.vtt"], $video->getSubtitleFiles());
99 $video =
$f->video(
"/foo");
101 $html = $r->render($video);
103 <div
class=
"il-video-container">
104 <video
class=
"il-video-player" id=
"id_1" src=
"/foo" style=
"max-width: 100%;" preload=
"metadata" >
119 $video =
$f->video(
"/foo")->withPoster(
"bar.jpg");
121 $html = $r->render($video);
124 <div
class=
"il-video-container">
125 <video
class=
"il-video-player" id=
"id_1" src=
"/foo" style=
"max-width: 100%;" preload=
"metadata" poster=
"bar.jpg">
140 $video =
$f->video(
"/foo")->withAdditionalSubtitleFile(
"en",
"subtitles.vtt");
142 $html = $r->render($video);
144 <div
class=
"il-video-container">
145 <video
class=
"il-video-player" id=
"id_1" src=
"/foo" style=
"max-width: 100%;" preload=
"metadata" >
146 <track kind=
"subtitles" src=
"subtitles.vtt" srclang=
"en" />
getDefaultRenderer(JavaScriptBinding $js_binding=null, array $with_stub_renderings=[])
test_get_title_get_subtitle_file()
test_render_with_subtitles()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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)
test_get_title_get_source()
Provides common functionality for UI tests.
test_implements_factory_interface()
test_render_with_poster()
__construct(Container $dic, ilPlugin $plugin)
test_get_title_get_poster()