ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 30 of file HTMLLearningModuleStandardGUIRequestTest.php.

31 {
32 $http_mock = $this->createMock(ILIAS\HTTP\Services::class);
33 $lng_mock = $this->createMock(ilLanguage::class);
34 $data = new \ILIAS\Data\Factory();
35 $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock);
36 return new \ILIAS\HTMLLearningModule\StandardGUIRequest(
37 $http_mock,
39 $get,
40 $post
41 );
42 }
$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 testRefId(), and testUserId().

+ Here is the caller graph for this function:

◆ tearDown()

HTMLLearningModuleStandardGUIRequestTest::tearDown ( )
protected

Definition at line 26 of file HTMLLearningModuleStandardGUIRequestTest.php.

26 : void
27 {
28 }

◆ testRefId()

HTMLLearningModuleStandardGUIRequestTest::testRefId ( )

Definition at line 44 of file HTMLLearningModuleStandardGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

◆ testUserId()

HTMLLearningModuleStandardGUIRequestTest::testUserId ( )

Definition at line 60 of file HTMLLearningModuleStandardGUIRequestTest.php.

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

References getRequest().

+ Here is the call graph for this function:

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