ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
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.

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

65  : I\Component\Button\Factory
66  {
67  return new I\Component\Button\Factory();
68  }
+ Here is the caller graph for this function:

◆ getDummyComponent()

ModalBase::getDummyComponent ( )
protected

◆ getModalFactory()

ModalBase::getModalFactory ( )
protected

Definition at line 50 of file ModalBase.php.

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

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(
59  new SignalGeneratorMock(),
60  $this->createMock(I\Component\Modal\InterruptiveItem\Factory::class),
61  $factory_mock
62  );
63  }
+ Here is the caller graph for this function:

◆ getUIFactory()

ModalBase::getUIFactory ( )

Definition at line 36 of file ModalBase.php.

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

Referenced by RoundTripTest\testSimpleRendering().

36  : NoUIFactory
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  }
legacy()
expected output: > ILIAS shows the rendered Component.
Definition: legacy.php:29
+ 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.

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

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  }
+ Here is the caller graph for this function:

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