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

Test clipboard repository. More...

+ Inheritance diagram for HelpStandardGUIRequestTest:
+ Collaboration diagram for HelpStandardGUIRequestTest:

Public Member Functions

 testRefId ()
 
 testHelpModuleId ()
 
 testTerm ()
 
 testIds ()
 
 testHelpScreenId ()
 

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 26 of file HelpStandardGUIRequestTest.php.

Member Function Documentation

◆ getRequest()

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

Definition at line 32 of file HelpStandardGUIRequestTest.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\Help\StandardGUIRequest(
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 testHelpModuleId(), testHelpScreenId(), testIds(), testRefId(), and testTerm().

+ Here is the caller graph for this function:

◆ tearDown()

HelpStandardGUIRequestTest::tearDown ( )
protected

Definition at line 28 of file HelpStandardGUIRequestTest.php.

28 : void
29 {
30 }

◆ testHelpModuleId()

HelpStandardGUIRequestTest::testHelpModuleId ( )

Definition at line 61 of file HelpStandardGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

◆ testHelpScreenId()

HelpStandardGUIRequestTest::testHelpScreenId ( )

Definition at line 107 of file HelpStandardGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

◆ testIds()

HelpStandardGUIRequestTest::testIds ( )

Definition at line 91 of file HelpStandardGUIRequestTest.php.

91 : void
92 {
93 $request = $this->getRequest(
94 [
95 ],
96 [
97 "id" => [4, 6, 7]
98 ]
99 );
100
101 $this->assertEquals(
102 [4, 6, 7],
103 $request->getIds()
104 );
105 }

References getRequest().

+ Here is the call graph for this function:

◆ testRefId()

HelpStandardGUIRequestTest::testRefId ( )

Definition at line 46 of file HelpStandardGUIRequestTest.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:

◆ testTerm()

HelpStandardGUIRequestTest::testTerm ( )

Definition at line 76 of file HelpStandardGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

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