ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
LearningHistoryStandardGUIRequestTest.php
Go to the documentation of this file.
1<?php
2
19use PHPUnit\Framework\TestCase;
20
25{
26 protected function tearDown(): void
27 {
28 }
29
30 protected function getRequest(array $get, array $post): \ILIAS\LearningHistory\StandardGUIRequest
31 {
32 $http_mock = $this->createMock(ILIAS\HTTP\Services::class);
33 $lng_mock = $this->createMock(ilLanguage::class);
34 $data = new \ILIAS\Data\Factory();
35 $refinery = new \ILIAS\Refinery\Factory($data, $lng_mock);
36 return new \ILIAS\LearningHistory\StandardGUIRequest(
37 $http_mock,
39 $get,
40 $post
41 );
42 }
43
44 public function testItems(): void
45 {
46 $request = $this->getRequest(
47 [
48 "to_ts" => "123"
49 ],
50 [
51 ]
52 );
53
54 $this->assertEquals(
55 123,
56 $request->getToTS()
57 );
58 }
59}
$post
Definition: ltitoken.php:46
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.