ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ModalBase Class Reference

Base class for modal tests. More...

+ Inheritance diagram for ModalBase:
+ Collaboration diagram for ModalBase:

Public Member Functions

 getUIFactory ()
 
 normalizeHTML (string $html)
 

Protected Member Functions

 getModalFactory ()
 
 getButtonFactory ()
 
 getDummyComponent ()
 

Detailed Description

Base class for modal tests.

Author
Stefan Wanzenried sw@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 34 of file ModalBase.php.

Member Function Documentation

◆ getButtonFactory()

ModalBase::getButtonFactory ( )
protected

Definition at line 65 of file ModalBase.php.

65 : I\Component\Button\Factory
66 {
67 return new I\Component\Button\Factory();
68 }

Referenced by RoundTripTest\testGetActionButtons(), RoundTripTest\testSimpleRendering(), and RoundTripTest\testWithActionButtons().

+ Here is the caller graph for this function:

◆ getDummyComponent()

ModalBase::getDummyComponent ( )
protected

◆ getModalFactory()

ModalBase::getModalFactory ( )
protected

Definition at line 50 of file ModalBase.php.

50 : I\Component\Modal\Factory
51 {
52 $group_mock = $this->createMock(Group::class);
53 $group_mock->method('withNameFrom')->willReturnSelf();
54
55 $factory_mock = $this->createMock(FieldFactory::class);
56 $factory_mock->method('group')->willReturn($group_mock);
57
58 return new I\Component\Modal\Factory(
60 $this->createMock(I\Component\Modal\InterruptiveItem\Factory::class),
61 $factory_mock
62 );
63 }

Referenced by LightboxTest\testDifferentPageTypeRendering(), RoundTripTest\testGetActionButtons(), InterruptiveTest\testGetAffectedItems(), RoundTripTest\testGetContent(), InterruptiveTest\testGetFormAction(), InterruptiveTest\testGetMessage(), LightboxTest\testGetMultiplePage(), LightboxTest\testGetSinglePage(), InterruptiveTest\testGetTitle(), RoundTripTest\testGetTitle(), ModalFactoryTest\testImplementsFactoryInterface(), InterruptiveTest\testLabels(), InterruptiveTest\testRenderingWithItems(), LightboxTest\testSimplePageRendering(), InterruptiveTest\testSimpleRendering(), RoundTripTest\testSimpleRendering(), RoundTripTest\testWithActionButtons(), InterruptiveTest\testWithAffectedItems(), and InterruptiveTest\testWithFormAction().

+ Here is the caller graph for this function:

◆ getUIFactory()

ModalBase::getUIFactory ( )

Definition at line 36 of file ModalBase.php.

37 {
38 return new class () extends NoUIFactory {
39 public function counter(): I\Component\Counter\Factory
40 {
41 return new I\Component\Counter\Factory();
42 }
43 public function legacy(): I\Component\Legacy\Factory
44 {
45 return new I\Component\Legacy\Factory(new I\Component\SignalGenerator());
46 }
47 };
48 }

References ILIAS\UI\examples\MainControls\Slate\Legacy\legacy().

Referenced by RoundTripTest\testSimpleRendering().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ normalizeHTML()

ModalBase::normalizeHTML ( string  $html)

Definition at line 75 of file ModalBase.php.

75 : string
76 {
77 $html = parent::normalizeHTML($html);
78 // The times entity is used for closing the modal and not supported in DomDocument::loadXML()
79 return str_replace(['×', "\t"], ['', ''], $html);
80 }

Referenced by LightboxTest\testDifferentPageTypeRendering(), InterruptiveTest\testRenderingWithItems(), and LightboxTest\testSimplePageRendering().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: