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

Tests on abstract base class for modals. More...

+ Inheritance diagram for ModalTest:
+ Collaboration diagram for ModalTest:

Public Member Functions

 testWithCloseWithKeyboard ()
 
 testWithAsyncRenderedUrl ()
 
 testGetSignals ()
 
 testWithResetSignals ()
 
- Public Member Functions inherited from ModalBase
 getUIFactory ()
 
 normalizeHTML (string $html)
 

Protected Member Functions

 getModal ()
 
- Protected Member Functions inherited from ModalBase
 getModalFactory ()
 
 getButtonFactory ()
 
 getDummyComponent ()
 

Detailed Description

Tests on abstract base class for modals.

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

Definition at line 30 of file ModalTest.php.

Member Function Documentation

◆ getModal()

ModalTest::getModal ( )
protected

Definition at line 70 of file ModalTest.php.

Referenced by testGetSignals(), testWithAsyncRenderedUrl(), testWithCloseWithKeyboard(), and testWithResetSignals().

+ Here is the caller graph for this function:

◆ testGetSignals()

ModalTest::testGetSignals ( )

Definition at line 46 of file ModalTest.php.

46 : void
47 {
48 $modal = $this->getModal();
49 $show = $modal->getShowSignal();
50 $close = $modal->getCloseSignal();
51 $this->assertEquals('signal_1', "$show");
52 $this->assertEquals('signal_2', "$close");
53 $modal2 = $modal->withAsyncRenderUrl('blub');
54 $show = $modal2->getShowSignal();
55 $close = $modal2->getCloseSignal();
56 $this->assertEquals('signal_1', "$show");
57 $this->assertEquals('signal_2', "$close");
58 }

References getModal().

+ Here is the call graph for this function:

◆ testWithAsyncRenderedUrl()

ModalTest::testWithAsyncRenderedUrl ( )

Definition at line 40 of file ModalTest.php.

40 : void
41 {
42 $modal = $this->getModal()->withAsyncRenderUrl('/fake/async/url');
43 $this->assertEquals('/fake/async/url', $modal->getAsyncRenderUrl());
44 }

References getModal().

+ Here is the call graph for this function:

◆ testWithCloseWithKeyboard()

ModalTest::testWithCloseWithKeyboard ( )

Definition at line 32 of file ModalTest.php.

32 : void
33 {
34 $modal = $this->getModal();
35 $this->assertEquals(true, $modal->getCloseWithKeyboard());
36 $modal = $modal->withCloseWithKeyboard(false);
37 $this->assertEquals(false, $modal->getCloseWithKeyboard());
38 }

References getModal().

+ Here is the call graph for this function:

◆ testWithResetSignals()

ModalTest::testWithResetSignals ( )

Definition at line 60 of file ModalTest.php.

60 : void
61 {
62 $modal = $this->getModal();
63 $modal2 = $modal->withResetSignals();
64 $show = $modal2->getShowSignal();
65 $close = $modal2->getCloseSignal();
66 $this->assertEquals('signal_3', "$show");
67 $this->assertEquals('signal_4', "$close");
68 }

References getModal().

+ Here is the call graph for this function:

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