ILIAS  release_8 Revision v8.24
LinkStandardGUIRequestTest Class Reference
+ Inheritance diagram for LinkStandardGUIRequestTest:
+ Collaboration diagram for 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 8 of file LinkStandardGUIRequestTest.php.

Member Function Documentation

◆ getRequest()

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

Definition at line 14 of file LinkStandardGUIRequestTest.php.

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

References $data, $post, and ILIAS\Repository\$refinery.

Referenced by testDo(), testLinkParentFolderId(), testLinkParentObjId(), testLinkParentRefId(), testLinkType(), testMediaPoolFolder(), testSelectedId(), and testUserSearchString().

+ Here is the caller graph for this function:

◆ tearDown()

LinkStandardGUIRequestTest::tearDown ( )
protected

Definition at line 10 of file LinkStandardGUIRequestTest.php.

10 : void
11 {
12 }

◆ testDo()

LinkStandardGUIRequestTest::testDo ( )

Definition at line 44 of file LinkStandardGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

◆ testLinkParentFolderId()

LinkStandardGUIRequestTest::testLinkParentFolderId ( )

Definition at line 108 of file LinkStandardGUIRequestTest.php.

108 : void
109 {
110 $request = $this->getRequest(
111 [
112 "link_par_fold_id" => "18"
113 ],
114 [
115 ]
116 );
117
118 $this->assertEquals(
119 18,
120 $request->getLinkParentFolderId()
121 );
122 }

References getRequest().

+ Here is the call graph for this function:

◆ testLinkParentObjId()

LinkStandardGUIRequestTest::testLinkParentObjId ( )

Definition at line 92 of file LinkStandardGUIRequestTest.php.

92 : void
93 {
94 $request = $this->getRequest(
95 [
96 "link_par_obj_id" => "13"
97 ],
98 [
99 ]
100 );
101
102 $this->assertEquals(
103 13,
104 $request->getLinkParentObjId()
105 );
106 }

References getRequest().

+ Here is the call graph for this function:

◆ testLinkParentRefId()

LinkStandardGUIRequestTest::testLinkParentRefId ( )

Definition at line 124 of file LinkStandardGUIRequestTest.php.

124 : void
125 {
126 $request = $this->getRequest(
127 [
128 "link_par_ref_id" => "22"
129 ],
130 [
131 ]
132 );
133
134 $this->assertEquals(
135 22,
136 $request->getLinkParentRefId()
137 );
138 }

References getRequest().

+ Here is the call graph for this function:

◆ testLinkType()

LinkStandardGUIRequestTest::testLinkType ( )

Definition at line 76 of file LinkStandardGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

◆ testMediaPoolFolder()

LinkStandardGUIRequestTest::testMediaPoolFolder ( )

Definition at line 60 of file LinkStandardGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

◆ testSelectedId()

LinkStandardGUIRequestTest::testSelectedId ( )

Definition at line 28 of file LinkStandardGUIRequestTest.php.

28 : void
29 {
30 $request = $this->getRequest(
31 [
32 "sel_id" => "123"
33 ],
34 [
35 ]
36 );
37
38 $this->assertEquals(
39 123,
40 $request->getSelectedId()
41 );
42 }

References getRequest().

+ Here is the call graph for this function:

◆ testUserSearchString()

LinkStandardGUIRequestTest::testUserSearchString ( )

Definition at line 140 of file LinkStandardGUIRequestTest.php.

140 : void
141 {
142 $request = $this->getRequest(
143 [
144 ],
145 [
146 "usr_search_str" => "term"
147 ]
148 );
149
150 $this->assertEquals(
151 "term",
152 $request->getUserSearchStr()
153 );
154 }

References getRequest().

+ Here is the call graph for this function:

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