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

Public Member Functions

 testRefId ()
 
 testUserId ()
 

Protected Member Functions

 tearDown ()
 
 getRequest (array $get, array $post)
 

Detailed Description

Member Function Documentation

◆ getRequest()

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

Definition at line 14 of file HTMLLearningModuleStandardGUIRequestTest.php.

15 {
16 $http_mock = $this->createMock(ILIAS\HTTP\Services::class);
17 $lng_mock = $this->createMock(ilLanguage::class);
18 $data = new \ILIAS\Data\Factory();
19 $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock);
20 return new \ILIAS\HTMLLearningModule\StandardGUIRequest(
21 $http_mock,
23 $get,
24 $post
25 );
26 }
$post
Definition: ltitoken.php:49
Refinery Factory $refinery
Class ChatMainBarProvider \MainMenu\Provider.

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

Referenced by testRefId(), and testUserId().

+ Here is the caller graph for this function:

◆ tearDown()

HTMLLearningModuleStandardGUIRequestTest::tearDown ( )
protected

Definition at line 10 of file HTMLLearningModuleStandardGUIRequestTest.php.

10 : void
11 {
12 }

◆ testRefId()

HTMLLearningModuleStandardGUIRequestTest::testRefId ( )

Definition at line 28 of file HTMLLearningModuleStandardGUIRequestTest.php.

28 : void
29 {
30 $request = $this->getRequest(
31 [
32 "ref_id" => "66"
33 ],
34 [
35 ]
36 );
37
38 $this->assertEquals(
39 66,
40 $request->getRefId()
41 );
42 }

References getRequest().

+ Here is the call graph for this function:

◆ testUserId()

HTMLLearningModuleStandardGUIRequestTest::testUserId ( )

Definition at line 44 of file HTMLLearningModuleStandardGUIRequestTest.php.

44 : void
45 {
46 $request = $this->getRequest(
47 [
48 "user_id" => "4"
49 ],
50 [
51 ]
52 );
53
54 $this->assertEquals(
55 4,
56 $request->getUserId()
57 );
58 }

References getRequest().

+ Here is the call graph for this function:

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