ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
BlogStandardGUIRequestTest Class Reference
+ Inheritance diagram for BlogStandardGUIRequestTest:
+ Collaboration diagram for BlogStandardGUIRequestTest:

Public Member Functions

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

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

Member Function Documentation

◆ getRequest()

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

Definition at line 34 of file BlogStandardGUIRequestTest.php.

35 {
36 $http_mock = $this->createMock(ILIAS\HTTP\Services::class);
37 $lng_mock = $this->createMock(ilLanguage::class);
38 $data = new \ILIAS\Data\Factory();
39 $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock);
40 return new \ILIAS\Blog\StandardGUIRequest(
41 $http_mock,
43 $get,
44 $post
45 );
46 }
$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 testBlogPage(), testIds(), testKeyword(), testObjIds(), testRefId(), and testUserLogin().

+ Here is the caller graph for this function:

◆ tearDown()

BlogStandardGUIRequestTest::tearDown ( )
protected

Definition at line 30 of file BlogStandardGUIRequestTest.php.

30 : void
31 {
32 }

◆ testBlogPage()

BlogStandardGUIRequestTest::testBlogPage ( )

Definition at line 63 of file BlogStandardGUIRequestTest.php.

64 {
65 $request = $this->getRequest(
66 [
67 "blpg" => "6"
68 ],
69 []
70 );
71
72 $this->assertEquals(
73 6,
74 $request->getBlogPage()
75 );
76 }
getRequest(array $get, array $post)

References getRequest().

+ Here is the call graph for this function:

◆ testIds()

BlogStandardGUIRequestTest::testIds ( )

Definition at line 94 of file BlogStandardGUIRequestTest.php.

95 {
96 $request = $this->getRequest(
97 [
98 ],
99 [
100 "id" => ["12", "17"]
101 ]
102 );
103
104 $this->assertEquals(
105 [12,17],
106 $request->getIds()
107 );
108 }

References getRequest().

+ Here is the call graph for this function:

◆ testKeyword()

BlogStandardGUIRequestTest::testKeyword ( )

Definition at line 125 of file BlogStandardGUIRequestTest.php.

126 {
127 $request = $this->getRequest(
128 [
129 "kwd" => "my_keyw"
130 ],
131 []
132 );
133
134 $this->assertEquals(
135 "my_keyw",
136 $request->getKeyword()
137 );
138 }

References getRequest().

+ Here is the call graph for this function:

◆ testObjIds()

BlogStandardGUIRequestTest::testObjIds ( )

Definition at line 78 of file BlogStandardGUIRequestTest.php.

79 {
80 $request = $this->getRequest(
81 [
82 ],
83 [
84 "obj_id" => ["3", "7"]
85 ]
86 );
87
88 $this->assertEquals(
89 [3,7],
90 $request->getObjIds()
91 );
92 }

References getRequest().

+ Here is the call graph for this function:

◆ testRefId()

BlogStandardGUIRequestTest::testRefId ( )

Definition at line 48 of file BlogStandardGUIRequestTest.php.

49 {
50 $request = $this->getRequest(
51 [
52 "ref_id" => "5"
53 ],
54 []
55 );
56
57 $this->assertEquals(
58 5,
59 $request->getRefId()
60 );
61 }

References getRequest().

+ Here is the call graph for this function:

◆ testUserLogin()

BlogStandardGUIRequestTest::testUserLogin ( )

Definition at line 110 of file BlogStandardGUIRequestTest.php.

111 {
112 $request = $this->getRequest(
113 [
114 "user_login" => "my_login"
115 ],
116 []
117 );
118
119 $this->assertEquals(
120 "my_login",
121 $request->getUserLogin()
122 );
123 }

References getRequest().

+ Here is the call graph for this function:

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