ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ImprintStandardGUIRequestTest.php
Go to the documentation of this file.
1 <?php
2 
20 
25 {
26  //protected $backupGlobals = false;
27 
28  protected function tearDown(): void
29  {
30  }
31 
32  protected function getRequest(array $get, array $post): \ILIAS\Imprint\StandardGUIRequest
33  {
34  $http_mock = $this->createMock(ILIAS\HTTP\Services::class);
35  $lng_mock = $this->createMock(ilLanguage::class);
36  $data = new \ILIAS\Data\Factory();
37  $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock);
38  return new \ILIAS\Imprint\StandardGUIRequest(
39  $http_mock,
40  $refinery,
41  $get,
42  $post
43  );
44  }
45 
46  public function testBaseClass(): void
47  {
48  $request = $this->getRequest(
49  [
50  "baseClass" => "MyClass"
51  ],
52  []
53  );
54 
55  $this->assertEquals(
56  "MyClass",
57  $request->getBaseClass()
58  );
59  }
60 }
Interface Observer Contains several chained tasks and infos about them.
$post
Definition: ltitoken.php:46