ILIAS  release_8 Revision v8.24
ImprintStandardGUIRequestTest.php
Go to the documentation of this file.
1<?php
2
3use PHPUnit\Framework\TestCase;
4
8class ImprintStandardGUIRequestTest extends TestCase
9{
10 //protected $backupGlobals = false;
11
12 protected function tearDown(): void
13 {
14 }
15
16 protected function getRequest(array $get, array $post): \ILIAS\Imprint\StandardGUIRequest
17 {
18 $http_mock = $this->createMock(ILIAS\HTTP\Services::class);
19 $lng_mock = $this->createMock(ilLanguage::class);
20 $data = new \ILIAS\Data\Factory();
21 $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock);
22 return new \ILIAS\Imprint\StandardGUIRequest(
23 $http_mock,
25 $get,
26 $post
27 );
28 }
29
30 public function testBaseClass(): void
31 {
32 $request = $this->getRequest(
33 [
34 "baseClass" => "MyClass"
35 ],
36 []
37 );
38
39 $this->assertEquals(
40 "MyClass",
41 $request->getBaseClass()
42 );
43 }
44}
$post
Definition: ltitoken.php:49
Refinery Factory $refinery
Class ChatMainBarProvider \MainMenu\Provider.