ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
MultilingualismStandardGUIRequestTest.php
Go to the documentation of this file.
1 <?php
2 
20 
27 {
28  protected function tearDown(): void
29  {
30  }
31 
32  protected function getRequest(array $get, array $post): \ILIAS\Multilingualism\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\Multilingualism\StandardGUIRequest(
39  $http_mock,
40  $refinery,
41  $get,
42  $post
43  );
44  }
45 
46  public function testRefId(): void
47  {
48  $request = $this->getRequest(
49  [
50  ],
51  [
52  "lang" => [
53  "en" => "English",
54  "de" => "German"
55  ]
56  ]
57  );
58 
59  $this->assertEquals(
60  [
61  "en" => "English",
62  "de" => "German"
63  ],
64  $request->getLanguages()
65  );
66  }
67 }
Interface Observer Contains several chained tasks and infos about them.
$post
Definition: ltitoken.php:46