ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ModalBase.php
Go to the documentation of this file.
1<?php
2require_once(__DIR__ . "/../../../../libs/composer/vendor/autoload.php");
3require_once(__DIR__ . "/../../Base.php");
4
5use \ILIAS\UI\Component as C;
6
12abstract class ModalBase extends ILIAS_UI_TestBase
13{
14 public function getUIFactory()
15 {
16 return new \ILIAS\UI\Implementation\Factory();
17 }
18
19 protected function getModalFactory()
20 {
21 return new \ILIAS\UI\Implementation\Component\Modal\Factory(new SignalGeneratorMock());
22 }
23
24 protected function getButtonFactory()
25 {
26 return new \ILIAS\UI\Implementation\Component\Button\Factory();
27 }
28
29 protected function getDummyComponent()
30 {
31 return new DummyComponent();
32 }
33
34 public function normalizeHTML($html)
35 {
36 $html = parent::normalizeHTML($html);
37 // The times entity is used for closing the modal and not supported in DomDocument::loadXML()
38 return str_replace(['&times;', "\t"], ['', ''], $html);
39 }
40}
An exception for terminatinating execution or to throw for unit testing.
Provides common functionality for UI tests.
Definition: Base.php:178
Base class for modal tests.
Definition: ModalBase.php:13
getButtonFactory()
Definition: ModalBase.php:24
normalizeHTML($html)
Definition: ModalBase.php:34
getUIFactory()
Definition: ModalBase.php:14
getModalFactory()
Definition: ModalBase.php:19
getDummyComponent()
Definition: ModalBase.php:29
$html
Definition: example_001.php:87