ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
IntLink\LinkStandardGUIRequestTest Class Reference
+ Inheritance diagram for IntLink\LinkStandardGUIRequestTest:
+ Collaboration diagram for IntLink\LinkStandardGUIRequestTest:

Public Member Functions

 testSelectedId ()
 
 testDo ()
 
 testMediaPoolFolder ()
 
 testLinkType ()
 
 testLinkParentObjId ()
 
 testLinkParentFolderId ()
 
 testLinkParentRefId ()
 
 testUserSearchString ()
 

Protected Member Functions

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

Detailed Description

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

Definition at line 28 of file LinkStandardGUIRequestTest.php.

Member Function Documentation

◆ getRequest()

IntLink\LinkStandardGUIRequestTest::getRequest ( array  $get,
array  $post 
)
protected

Definition at line 34 of file LinkStandardGUIRequestTest.php.

35 {
36 $http_mock = $this->createMock(ILIAS\HTTP\Services::class);
37 $lng_mock = $this->createMock(ilLanguage::class);
38 $data = new \ILIAS\Data\Factory();
39 $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock);
40 return new \ILIAS\COPage\IntLink\StandardGUIRequest(
41 $http_mock,
43 $get,
44 $post
45 );
46 }
$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.

◆ tearDown()

IntLink\LinkStandardGUIRequestTest::tearDown ( )
protected

Definition at line 30 of file LinkStandardGUIRequestTest.php.

30 : void
31 {
32 }

◆ testDo()

IntLink\LinkStandardGUIRequestTest::testDo ( )

Definition at line 64 of file LinkStandardGUIRequestTest.php.

64 : void
65 {
66 $request = $this->getRequest(
67 [
68 "do" => "set"
69 ],
70 [
71 ]
72 );
73
74 $this->assertEquals(
75 "set",
76 $request->getDo()
77 );
78 }

◆ testLinkParentFolderId()

IntLink\LinkStandardGUIRequestTest::testLinkParentFolderId ( )

Definition at line 128 of file LinkStandardGUIRequestTest.php.

128 : void
129 {
130 $request = $this->getRequest(
131 [
132 "link_par_fold_id" => "18"
133 ],
134 [
135 ]
136 );
137
138 $this->assertEquals(
139 18,
140 $request->getLinkParentFolderId()
141 );
142 }

◆ testLinkParentObjId()

IntLink\LinkStandardGUIRequestTest::testLinkParentObjId ( )

Definition at line 112 of file LinkStandardGUIRequestTest.php.

112 : void
113 {
114 $request = $this->getRequest(
115 [
116 "link_par_obj_id" => "13"
117 ],
118 [
119 ]
120 );
121
122 $this->assertEquals(
123 13,
124 $request->getLinkParentObjId()
125 );
126 }

◆ testLinkParentRefId()

IntLink\LinkStandardGUIRequestTest::testLinkParentRefId ( )

Definition at line 144 of file LinkStandardGUIRequestTest.php.

144 : void
145 {
146 $request = $this->getRequest(
147 [
148 "link_par_ref_id" => "22"
149 ],
150 [
151 ]
152 );
153
154 $this->assertEquals(
155 22,
156 $request->getLinkParentRefId()
157 );
158 }

◆ testLinkType()

IntLink\LinkStandardGUIRequestTest::testLinkType ( )

Definition at line 96 of file LinkStandardGUIRequestTest.php.

96 : void
97 {
98 $request = $this->getRequest(
99 [
100 "link_type" => "mytype"
101 ],
102 [
103 ]
104 );
105
106 $this->assertEquals(
107 "mytype",
108 $request->getLinkType()
109 );
110 }

◆ testMediaPoolFolder()

IntLink\LinkStandardGUIRequestTest::testMediaPoolFolder ( )

Definition at line 80 of file LinkStandardGUIRequestTest.php.

80 : void
81 {
82 $request = $this->getRequest(
83 [
84 "mep_fold" => "14"
85 ],
86 [
87 ]
88 );
89
90 $this->assertEquals(
91 14,
92 $request->getMediaPoolFolder()
93 );
94 }

◆ testSelectedId()

IntLink\LinkStandardGUIRequestTest::testSelectedId ( )

Definition at line 48 of file LinkStandardGUIRequestTest.php.

48 : void
49 {
50 $request = $this->getRequest(
51 [
52 "sel_id" => "123"
53 ],
54 [
55 ]
56 );
57
58 $this->assertEquals(
59 123,
60 $request->getSelectedId()
61 );
62 }

◆ testUserSearchString()

IntLink\LinkStandardGUIRequestTest::testUserSearchString ( )

Definition at line 160 of file LinkStandardGUIRequestTest.php.

160 : void
161 {
162 $request = $this->getRequest(
163 [
164 ],
165 [
166 "usr_search_str" => "term"
167 ]
168 );
169
170 $this->assertEquals(
171 "term",
172 $request->getUserSearchStr()
173 );
174 }

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