ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ItemGroupStandardGUIRequestTest.php
Go to the documentation of this file.
1<?php
2
19use PHPUnit\Framework\TestCase;
20
24class ItemGroupStandardGUIRequestTest 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\ItemGroup\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\ItemGroup\StandardGUIRequest(
39 $http_mock,
41 $get,
42 $post
43 );
44 }
45
46 public function testItems()
47 {
48 $request = $this->getRequest(
49 [
50 ],
51 [
52 "items" => ["3", "7"]
53 ]
54 );
55
56 $this->assertEquals(
57 [3,7],
58 $request->getItems()
59 );
60 }
61}
$post
Definition: ltitoken.php:46
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.