ILIAS  release_8 Revision v8.24
FoldStandardGUIRequestTest Class Reference

Test clipboard repository. More...

+ Inheritance diagram for FoldStandardGUIRequestTest:
+ Collaboration diagram for FoldStandardGUIRequestTest:

Public Member Functions

 testRefId ()
 Test ref id. More...
 
 testNoRefId ()
 Test no ref id. More...
 
 testBaseClass ()
 Test base class. More...
 
 testCmdClass ()
 Test cmd class. More...
 
 testUserId ()
 Test user id. More...
 

Protected Member Functions

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

Detailed Description

Test clipboard repository.

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

Definition at line 12 of file FoldStandardGUIRequestTest.php.

Member Function Documentation

◆ getRequest()

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

Definition at line 18 of file FoldStandardGUIRequestTest.php.

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

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

Referenced by testBaseClass(), testCmdClass(), testNoRefId(), testRefId(), and testUserId().

+ Here is the caller graph for this function:

◆ tearDown()

FoldStandardGUIRequestTest::tearDown ( )
protected

Definition at line 14 of file FoldStandardGUIRequestTest.php.

14 : void
15 {
16 }

◆ testBaseClass()

FoldStandardGUIRequestTest::testBaseClass ( )

Test base class.

Definition at line 70 of file FoldStandardGUIRequestTest.php.

70 : void
71 {
72 $request = $this->getRequest(
73 [
74 "baseClass" => "myClass"
75 ],
76 []
77 );
78
79 $this->assertEquals(
80 "myClass",
81 $request->getBaseClass()
82 );
83 }
getRequest(array $get, array $post)

References getRequest().

+ Here is the call graph for this function:

◆ testCmdClass()

FoldStandardGUIRequestTest::testCmdClass ( )

Test cmd class.

Definition at line 88 of file FoldStandardGUIRequestTest.php.

88 : void
89 {
90 $request = $this->getRequest(
91 [
92 "cmdClass" => "myClass"
93 ],
94 []
95 );
96
97 $this->assertEquals(
98 "myClass",
99 $request->getCmdClass()
100 );
101 }

References getRequest().

+ Here is the call graph for this function:

◆ testNoRefId()

FoldStandardGUIRequestTest::testNoRefId ( )

Test no ref id.

Definition at line 53 of file FoldStandardGUIRequestTest.php.

53 : void
54 {
55 $request = $this->getRequest(
56 [
57 ],
58 []
59 );
60
61 $this->assertEquals(
62 0,
63 $request->getRefId()
64 );
65 }

References getRequest().

+ Here is the call graph for this function:

◆ testRefId()

FoldStandardGUIRequestTest::testRefId ( )

Test ref id.

Definition at line 35 of file FoldStandardGUIRequestTest.php.

35 : void
36 {
37 $request = $this->getRequest(
38 [
39 "ref_id" => "5"
40 ],
41 []
42 );
43
44 $this->assertEquals(
45 5,
46 $request->getRefId()
47 );
48 }

References getRequest().

+ Here is the call graph for this function:

◆ testUserId()

FoldStandardGUIRequestTest::testUserId ( )

Test user id.

Definition at line 106 of file FoldStandardGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

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