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

Member Function Documentation

◆ getRequest()

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

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

+ Here is the caller graph for this function:

◆ tearDown()

HelpStandardGUIRequestTest::tearDown ( )
protected

Definition at line 12 of file HelpStandardGUIRequestTest.php.

12 : void
13 {
14 }

◆ testHelpModuleId()

HelpStandardGUIRequestTest::testHelpModuleId ( )

Definition at line 45 of file HelpStandardGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

◆ testHelpScreenId()

HelpStandardGUIRequestTest::testHelpScreenId ( )

Definition at line 91 of file HelpStandardGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

◆ testIds()

HelpStandardGUIRequestTest::testIds ( )

Definition at line 75 of file HelpStandardGUIRequestTest.php.

75 : void
76 {
77 $request = $this->getRequest(
78 [
79 ],
80 [
81 "id" => [4, 6, 7]
82 ]
83 );
84
85 $this->assertEquals(
86 [4, 6, 7],
87 $request->getIds()
88 );
89 }

References getRequest().

+ Here is the call graph for this function:

◆ testRefId()

HelpStandardGUIRequestTest::testRefId ( )

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

◆ testTerm()

HelpStandardGUIRequestTest::testTerm ( )

Definition at line 60 of file HelpStandardGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

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