ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
RootStandardGUIRequestTest Class Reference

Test clipboard repository. More...

+ Inheritance diagram for RootStandardGUIRequestTest:
+ Collaboration diagram for RootStandardGUIRequestTest:

Public Member Functions

 testRefId ()
 Test ref id. More...
 
 testNoRefId ()
 Test no ref id. More...
 
 testBaseClass ()
 Test base class. More...
 

Protected Member Functions

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

Detailed Description

Test clipboard repository.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 12 of file RootStandardGUIRequestTest.php.

Member Function Documentation

◆ getRequest()

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

Definition at line 18 of file RootStandardGUIRequestTest.php.

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

Referenced by testBaseClass(), testNoRefId(), and testRefId().

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\RootFolder\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()

RootStandardGUIRequestTest::tearDown ( )
protected

Definition at line 14 of file RootStandardGUIRequestTest.php.

14  : void
15  {
16  }

◆ testBaseClass()

RootStandardGUIRequestTest::testBaseClass ( )

Test base class.

Definition at line 70 of file RootStandardGUIRequestTest.php.

References getRequest().

70  : void
71  {
72  $request = $this->getRequest(
73  [
74  "baseClass" => "myClass"
75  ],
76  []
77  );
78 
79  $this->assertEquals(
80  "myClass",
81  $request->getBaseClass()
82  );
83  }
getRequest(array $get, array $post)
+ Here is the call graph for this function:

◆ testNoRefId()

RootStandardGUIRequestTest::testNoRefId ( )

Test no ref id.

Definition at line 53 of file RootStandardGUIRequestTest.php.

References getRequest().

53  : void
54  {
55  $request = $this->getRequest(
56  [
57  ],
58  []
59  );
60 
61  $this->assertEquals(
62  0,
63  $request->getRefId()
64  );
65  }
getRequest(array $get, array $post)
+ Here is the call graph for this function:

◆ testRefId()

RootStandardGUIRequestTest::testRefId ( )

Test ref id.

Definition at line 35 of file RootStandardGUIRequestTest.php.

References getRequest().

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

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