ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilIndividualAssessmentCommonSettingsGUITest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
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 }
global $lng
Definition: privfeed.php:31