ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilIndividualAssessmentCommonSettingsGUITest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
24 {
25  public function test_createObject(): void
26  {
27  $iass = $this->createMock(ilObjIndividualAssessment::class);
28  $ctrl = $this->createMock(ilCtrl::class);
29  $tpl = $this->createMock(ilGlobalTemplateInterface::class);
30  $lng = $this->createMock(ilLanguage::class);
31  $obj_service = $this->createMock(ilObjectService::class);
32 
34  $iass,
35  $ctrl,
36  $tpl,
37  $lng,
38  $obj_service
39  );
40 
41  $this->assertInstanceOf(ilIndividualAssessmentCommonSettingsGUI::class, $obj);
42  }
43 
45  {
46  $iass = $this->createMock(ilObjIndividualAssessment::class);
47  $ctrl = $this->createMock(ilCtrl::class);
48  $tpl = $this->createMock(ilGlobalTemplateInterface::class);
49  $lng = $this->createMock(ilLanguage::class);
50  $obj_service = $this->createMock(ilObjectService::class);
51 
52  $ctrl
53  ->expects($this->once())
54  ->method("getCmd")
55  ->willReturn("unknown_command")
56  ;
57 
59  $iass,
60  $ctrl,
61  $tpl,
62  $lng,
63  $obj_service
64  );
65 
66  $this->expectException(Exception::class);
67  $this->expectExceptionMessage("Unknown command unknown_command");
68 
69  $obj->executeCommand();
70  }
71 }
$lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41