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

Test learning module editing request. More...

+ Inheritance diagram for LMEditingGUIRequestTest:
+ Collaboration diagram for LMEditingGUIRequestTest:

Public Member Functions

 testRefId ()
 
 testFirstChild ()
 
 testMulti ()
 
 testNodeId ()
 
 testTitles ()
 
 testIds ()
 

Protected Member Functions

 tearDown ()
 
 getRequest (array $get, array $post)
 

Detailed Description

Test learning module editing request.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 26 of file LMEditingGUIRequestTest.php.

Member Function Documentation

◆ getRequest()

LMEditingGUIRequestTest::getRequest ( array  $get,
array  $post 
)
protected

Definition at line 32 of file LMEditingGUIRequestTest.php.

33 {
34 $http_mock = $this->createMock(ILIAS\HTTP\Services::class);
35 $lng_mock = $this->createMock(ilLanguage::class);
36 $data = new \ILIAS\Data\Factory();
37 $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock);
38 return new \ILIAS\LearningModule\Editing\EditingGUIRequest(
39 $http_mock,
41 $get,
42 $post
43 );
44 }
$post
Definition: ltitoken.php:46
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

References $data, $post, and ILIAS\UI\examples\Layout\Page\Standard\$refinery.

Referenced by testFirstChild(), testIds(), testMulti(), testNodeId(), testRefId(), and testTitles().

+ Here is the caller graph for this function:

◆ tearDown()

LMEditingGUIRequestTest::tearDown ( )
protected

Definition at line 28 of file LMEditingGUIRequestTest.php.

28 : void
29 {
30 }

◆ testFirstChild()

LMEditingGUIRequestTest::testFirstChild ( )

Definition at line 61 of file LMEditingGUIRequestTest.php.

61 : void
62 {
63 $request = $this->getRequest(
64 [
65 "first_child" => "1"
66 ],
67 []
68 );
69
70 $this->assertEquals(
71 true,
72 $request->getFirstChild()
73 );
74 }
getRequest(array $get, array $post)

References getRequest().

+ Here is the call graph for this function:

◆ testIds()

LMEditingGUIRequestTest::testIds ( )

Definition at line 121 of file LMEditingGUIRequestTest.php.

121 : void
122 {
123 $request = $this->getRequest(
124 [
125 "id" => ["4", "6"]
126 ],
127 []
128 );
129
130 $this->assertEquals(
131 [4, 6],
132 $request->getIds()
133 );
134 }

References getRequest().

+ Here is the call graph for this function:

◆ testMulti()

LMEditingGUIRequestTest::testMulti ( )

Definition at line 76 of file LMEditingGUIRequestTest.php.

76 : void
77 {
78 $request = $this->getRequest(
79 [
80 "multi" => "1"
81 ],
82 []
83 );
84
85 $this->assertEquals(
86 1,
87 $request->getMulti()
88 );
89 }

References getRequest().

+ Here is the call graph for this function:

◆ testNodeId()

LMEditingGUIRequestTest::testNodeId ( )

Definition at line 91 of file LMEditingGUIRequestTest.php.

91 : void
92 {
93 $request = $this->getRequest(
94 [
95 "node_id" => "5"
96 ],
97 []
98 );
99
100 $this->assertEquals(
101 5,
102 $request->getNodeId()
103 );
104 }

References getRequest().

+ Here is the call graph for this function:

◆ testRefId()

LMEditingGUIRequestTest::testRefId ( )

Definition at line 46 of file LMEditingGUIRequestTest.php.

46 : void
47 {
48 $request = $this->getRequest(
49 [
50 "ref_id" => "5"
51 ],
52 []
53 );
54
55 $this->assertEquals(
56 5,
57 $request->getRefId()
58 );
59 }

References getRequest().

+ Here is the call graph for this function:

◆ testTitles()

LMEditingGUIRequestTest::testTitles ( )

Definition at line 106 of file LMEditingGUIRequestTest.php.

106 : void
107 {
108 $request = $this->getRequest(
109 [
110 "title" => ["1" => "test", "2" => "titles"]
111 ],
112 []
113 );
114
115 $this->assertEquals(
116 ["1" => "test", "2" => "titles"],
117 $request->getTitles()
118 );
119 }

References getRequest().

+ Here is the call graph for this function:

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