ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ImprintStandardGUIRequestTest.php
Go to the documentation of this file.
1<?php
2
19use PHPUnit\Framework\TestCase;
20
24class ImprintStandardGUIRequestTest extends TestCase
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,
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}
$post
Definition: ltitoken.php:46
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.