ILIAS  release_8 Revision v8.24
ItemGroupStandardGUIRequestTest.php
Go to the documentation of this file.
1<?php
2
3use PHPUnit\Framework\TestCase;
4
8class ItemGroupStandardGUIRequestTest 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\ItemGroup\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\ItemGroup\StandardGUIRequest(
23 $http_mock,
25 $get,
26 $post
27 );
28 }
29
30 public function testItems()
31 {
32 $request = $this->getRequest(
33 [
34 ],
35 [
36 "items" => ["3", "7"]
37 ]
38 );
39
40 $this->assertEquals(
41 [3,7],
42 $request->getItems()
43 );
44 }
45}
$post
Definition: ltitoken.php:49
Refinery Factory $refinery
Class ChatMainBarProvider \MainMenu\Provider.