ILIAS  release_8 Revision v8.24
AdveStandardGUIRequestTest.php
Go to the documentation of this file.
1<?php
2
3use PHPUnit\Framework\TestCase;
4
10class AdveStandardGUIRequestTest extends TestCase
11{
12 protected function tearDown(): void
13 {
14 }
15
16 protected function getRequest(array $get, array $post): \ILIAS\AdvancedEditing\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\AdvancedEditing\StandardGUIRequest(
23 $http_mock,
25 $get,
26 $post
27 );
28 }
29
33 public function testGroup(): void
34 {
35 $request = $this->getRequest(
36 [
37 "grp" => "5"
38 ],
39 []
40 );
41
42 $this->assertEquals(
43 "5",
44 $request->getGroup()
45 );
46 }
47}
getRequest(array $get, array $post)
$post
Definition: ltitoken.php:49
Refinery Factory $refinery
Class ChatMainBarProvider \MainMenu\Provider.