ILIAS  release_8 Revision v8.24
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 10 of file LMEditingGUIRequestTest.php.

Member Function Documentation

◆ getRequest()

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

Definition at line 16 of file LMEditingGUIRequestTest.php.

17 {
18 $http_mock = $this->createMock(ILIAS\HTTP\Services::class);
19 $lng_mock = $this->createMock(ilLanguage::class);
20 $data = new \ILIAS\Data\Factory();
21 $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock);
22 return new \ILIAS\LearningModule\Editing\EditingGUIRequest(
23 $http_mock,
25 $get,
26 $post
27 );
28 }
$post
Definition: ltitoken.php:49
Refinery Factory $refinery
Class ChatMainBarProvider \MainMenu\Provider.

References $data, $post, and ILIAS\Repository\$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 12 of file LMEditingGUIRequestTest.php.

12 : void
13 {
14 }

◆ testFirstChild()

LMEditingGUIRequestTest::testFirstChild ( )

Definition at line 45 of file LMEditingGUIRequestTest.php.

45 : void
46 {
47 $request = $this->getRequest(
48 [
49 "first_child" => "1"
50 ],
51 []
52 );
53
54 $this->assertEquals(
55 true,
56 $request->getFirstChild()
57 );
58 }
getRequest(array $get, array $post)

References getRequest().

+ Here is the call graph for this function:

◆ testIds()

LMEditingGUIRequestTest::testIds ( )

Definition at line 105 of file LMEditingGUIRequestTest.php.

105 : void
106 {
107 $request = $this->getRequest(
108 [
109 "id" => ["4", "6"]
110 ],
111 []
112 );
113
114 $this->assertEquals(
115 [4, 6],
116 $request->getIds()
117 );
118 }

References getRequest().

+ Here is the call graph for this function:

◆ testMulti()

LMEditingGUIRequestTest::testMulti ( )

Definition at line 60 of file LMEditingGUIRequestTest.php.

60 : void
61 {
62 $request = $this->getRequest(
63 [
64 "multi" => "1"
65 ],
66 []
67 );
68
69 $this->assertEquals(
70 1,
71 $request->getMulti()
72 );
73 }

References getRequest().

+ Here is the call graph for this function:

◆ testNodeId()

LMEditingGUIRequestTest::testNodeId ( )

Definition at line 75 of file LMEditingGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

◆ testRefId()

LMEditingGUIRequestTest::testRefId ( )

Definition at line 30 of file LMEditingGUIRequestTest.php.

30 : void
31 {
32 $request = $this->getRequest(
33 [
34 "ref_id" => "5"
35 ],
36 []
37 );
38
39 $this->assertEquals(
40 5,
41 $request->getRefId()
42 );
43 }

References getRequest().

+ Here is the call graph for this function:

◆ testTitles()

LMEditingGUIRequestTest::testTitles ( )

Definition at line 90 of file LMEditingGUIRequestTest.php.

90 : void
91 {
92 $request = $this->getRequest(
93 [
94 "title" => ["1" => "test", "2" => "titles"]
95 ],
96 []
97 );
98
99 $this->assertEquals(
100 ["1" => "test", "2" => "titles"],
101 $request->getTitles()
102 );
103 }

References getRequest().

+ Here is the call graph for this function:

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