ILIAS  release_8 Revision v8.24
BlogStandardGUIRequestTest Class Reference
+ Inheritance diagram for BlogStandardGUIRequestTest:
+ Collaboration diagram for BlogStandardGUIRequestTest:

Public Member Functions

 testRefId ()
 
 testBlogPage ()
 
 testObjIds ()
 
 testIds ()
 
 testUserLogin ()
 
 testKeyword ()
 

Protected Member Functions

 setUp ()
 
 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 BlogStandardGUIRequestTest.php.

Member Function Documentation

◆ getRequest()

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

Definition at line 21 of file BlogStandardGUIRequestTest.php.

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

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

Referenced by testBlogPage(), testIds(), testKeyword(), testObjIds(), testRefId(), and testUserLogin().

+ Here is the caller graph for this function:

◆ setUp()

BlogStandardGUIRequestTest::setUp ( )
protected

Definition at line 12 of file BlogStandardGUIRequestTest.php.

12 : void
13 {
14 parent::setUp();
15 }

◆ tearDown()

BlogStandardGUIRequestTest::tearDown ( )
protected

Definition at line 17 of file BlogStandardGUIRequestTest.php.

17 : void
18 {
19 }

◆ testBlogPage()

BlogStandardGUIRequestTest::testBlogPage ( )

Definition at line 50 of file BlogStandardGUIRequestTest.php.

51 {
52 $request = $this->getRequest(
53 [
54 "blpg" => "6"
55 ],
56 []
57 );
58
59 $this->assertEquals(
60 6,
61 $request->getBlogPage()
62 );
63 }
getRequest(array $get, array $post)

References getRequest().

+ Here is the call graph for this function:

◆ testIds()

BlogStandardGUIRequestTest::testIds ( )

Definition at line 81 of file BlogStandardGUIRequestTest.php.

82 {
83 $request = $this->getRequest(
84 [
85 ],
86 [
87 "id" => ["12", "17"]
88 ]
89 );
90
91 $this->assertEquals(
92 [12,17],
93 $request->getIds()
94 );
95 }

References getRequest().

+ Here is the call graph for this function:

◆ testKeyword()

BlogStandardGUIRequestTest::testKeyword ( )

Definition at line 112 of file BlogStandardGUIRequestTest.php.

113 {
114 $request = $this->getRequest(
115 [
116 "kwd" => "my_keyw"
117 ],
118 []
119 );
120
121 $this->assertEquals(
122 "my_keyw",
123 $request->getKeyword()
124 );
125 }

References getRequest().

+ Here is the call graph for this function:

◆ testObjIds()

BlogStandardGUIRequestTest::testObjIds ( )

Definition at line 65 of file BlogStandardGUIRequestTest.php.

66 {
67 $request = $this->getRequest(
68 [
69 ],
70 [
71 "obj_id" => ["3", "7"]
72 ]
73 );
74
75 $this->assertEquals(
76 [3,7],
77 $request->getObjIds()
78 );
79 }

References getRequest().

+ Here is the call graph for this function:

◆ testRefId()

BlogStandardGUIRequestTest::testRefId ( )

Definition at line 35 of file BlogStandardGUIRequestTest.php.

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:

◆ testUserLogin()

BlogStandardGUIRequestTest::testUserLogin ( )

Definition at line 97 of file BlogStandardGUIRequestTest.php.

98 {
99 $request = $this->getRequest(
100 [
101 "user_login" => "my_login"
102 ],
103 []
104 );
105
106 $this->assertEquals(
107 "my_login",
108 $request->getUserLogin()
109 );
110 }

References getRequest().

+ Here is the call graph for this function:

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