ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 10 of file BlogStandardGUIRequestTest.php.

Member Function Documentation

◆ getRequest()

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

Definition at line 18 of file BlogStandardGUIRequestTest.php.

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

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

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\Blog\StandardGUIRequest(
25  $http_mock,
26  $refinery,
27  $get,
28  $post
29  );
30  }
Class ChatMainBarProvider .
$post
Definition: ltitoken.php:49
Refinery Factory $refinery
+ Here is the caller graph for this function:

◆ tearDown()

BlogStandardGUIRequestTest::tearDown ( )
protected

Definition at line 14 of file BlogStandardGUIRequestTest.php.

14  : void
15  {
16  }

◆ testBlogPage()

BlogStandardGUIRequestTest::testBlogPage ( )

Definition at line 47 of file BlogStandardGUIRequestTest.php.

References getRequest().

48  {
49  $request = $this->getRequest(
50  [
51  "blpg" => "6"
52  ],
53  []
54  );
55 
56  $this->assertEquals(
57  6,
58  $request->getBlogPage()
59  );
60  }
getRequest(array $get, array $post)
+ Here is the call graph for this function:

◆ testIds()

BlogStandardGUIRequestTest::testIds ( )

Definition at line 78 of file BlogStandardGUIRequestTest.php.

References getRequest().

79  {
80  $request = $this->getRequest(
81  [
82  ],
83  [
84  "id" => ["12", "17"]
85  ]
86  );
87 
88  $this->assertEquals(
89  [12,17],
90  $request->getIds()
91  );
92  }
getRequest(array $get, array $post)
+ Here is the call graph for this function:

◆ testKeyword()

BlogStandardGUIRequestTest::testKeyword ( )

Definition at line 109 of file BlogStandardGUIRequestTest.php.

References getRequest().

110  {
111  $request = $this->getRequest(
112  [
113  "kwd" => "my_keyw"
114  ],
115  []
116  );
117 
118  $this->assertEquals(
119  "my_keyw",
120  $request->getKeyword()
121  );
122  }
getRequest(array $get, array $post)
+ Here is the call graph for this function:

◆ testObjIds()

BlogStandardGUIRequestTest::testObjIds ( )

Definition at line 62 of file BlogStandardGUIRequestTest.php.

References getRequest().

63  {
64  $request = $this->getRequest(
65  [
66  ],
67  [
68  "obj_id" => ["3", "7"]
69  ]
70  );
71 
72  $this->assertEquals(
73  [3,7],
74  $request->getObjIds()
75  );
76  }
getRequest(array $get, array $post)
+ Here is the call graph for this function:

◆ testRefId()

BlogStandardGUIRequestTest::testRefId ( )

Definition at line 32 of file BlogStandardGUIRequestTest.php.

References getRequest().

33  {
34  $request = $this->getRequest(
35  [
36  "ref_id" => "5"
37  ],
38  []
39  );
40 
41  $this->assertEquals(
42  5,
43  $request->getRefId()
44  );
45  }
getRequest(array $get, array $post)
+ Here is the call graph for this function:

◆ testUserLogin()

BlogStandardGUIRequestTest::testUserLogin ( )

Definition at line 94 of file BlogStandardGUIRequestTest.php.

References getRequest().

95  {
96  $request = $this->getRequest(
97  [
98  "user_login" => "my_login"
99  ],
100  []
101  );
102 
103  $this->assertEquals(
104  "my_login",
105  $request->getUserLogin()
106  );
107  }
getRequest(array $get, array $post)
+ Here is the call graph for this function:

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