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