19declare(strict_types=1);
21require_once(__DIR__ .
"/../../../../../../vendor/composer/vendor/autoload.php");
22require_once(__DIR__ .
"/../../Base.php");
36 $this->createMock(
I\
Component\Modal\InterruptiveItem\Factory::class),
37 $this->createMock(FieldFactory::class),
40 protected I\
Component\Modal\InterruptiveItem\Factory $interruptive_item_factory,
41 protected FieldFactory $field_factory,
45 public function modal(): I\Component\Modal\Factory
47 return new I\Component\Modal\Factory(
49 $this->interruptive_item_factory,
53 public function button(): I\Component\Button\Factory
55 return new I\Component\Button\Factory();
62 return new I\Component\Player\Factory();
69 $audio =
$f->audio(
"/foo",
"bar");
71 $this->assertInstanceOf(
"ILIAS\\UI\\Component\\Player\\Audio", $audio);
78 $audio =
$f->audio(
"/foo");
80 $this->assertEquals(
"/foo", $audio->getSource());
87 $audio =
$f->audio(
"/foo",
"bar");
89 $this->assertEquals(
"bar", $audio->getTranscription());
95 $r = $this->getDefaultRenderer();
97 $audio =
$f->audio(
"/foo");
99 $html = $r->render($audio);
102<div
class=
"il-audio-container">
103 <audio
class=
"il-audio-player" id=
"id_1" src=
"/foo" preload=
"metadata"></audio>
106 $this->assertHTMLEquals(
107 $this->brutallyTrimHTML($expected),
108 $this->brutallyTrimHTML($html)
115 $r = $this->getDefaultRenderer();
117 $audio =
$f->audio(
"/foo",
"x*123");
119 $html = $r->render($audio);
123 is_int(strpos($html,
"ui_transcription</button>"))
127 is_int(strpos($html,
"il-modal-lightbox"))
131 is_int(strpos($html,
"x*123"))
Provides common functionality for UI tests.
testRenderWithTranscript()
testGetTitleGetTranscript()
testImplementsFactoryInterface()
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
modal(string $title="", string $cancel_label="")
button(string $caption, string $cmd)