ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilObjTestVerificationListGUITest.php
Go to the documentation of this file.
1 <?php
2 
20 {
22 
23  protected function setUp(): void
24  {
25  parent::setUp();
26 
27  $this->addGlobal_ilAccess();
28  $this->addGlobal_ilSetting();
29  $this->addGlobal_filesystem();
30  $this->addGlobal_rbacsystem();
31  $this->addGlobal_rbacreview();
32  $this->addGlobal_ilObjDataCache();
34 
35  $this->testObj = new ilObjTestVerificationListGUI();
36  }
37  public function testConstruct(): void
38  {
39  $this->assertInstanceOf(ilObjTestVerificationListGUI::class, $this->testObj);
40  }
41 
42  public function testInit(): void
43  {
44  $this->assertNull($this->testObj->init());
45 
46  $reflection = new ReflectionObject($this->testObj);
47 
48  $delete_enabled_property = $reflection->getProperty('delete_enabled');
49  $this->assertTrue($delete_enabled_property->getValue($this->testObj));
50 
51  $cut_enabled_property = $reflection->getProperty('cut_enabled');
52  $this->assertTrue($cut_enabled_property->getValue($this->testObj));
53 
54  $copy_enabled_property = $reflection->getProperty('copy_enabled');
55  $this->assertTrue($copy_enabled_property->getValue($this->testObj));
56 
57  $subscribe_enabled_property = $reflection->getProperty('subscribe_enabled');
58  $this->assertFalse($subscribe_enabled_property->getValue($this->testObj));
59 
60  $link_enabled_property = $reflection->getProperty('link_enabled');
61  $this->assertFalse($link_enabled_property->getValue($this->testObj));
62 
63  $info_screen_enabled_property = $reflection->getProperty('info_screen_enabled');
64  $this->assertFalse($info_screen_enabled_property->getValue($this->testObj));
65 
66  $type_property = $reflection->getProperty('type');
67  $this->assertEquals('tstv', $type_property->getValue($this->testObj));
68 
69  $gui_class_name_property = $reflection->getProperty('gui_class_name');
70  $this->assertEquals(ilObjTestVerificationGUI::class, $gui_class_name_property->getValue($this->testObj));
71 
72  $commands_property = $reflection->getProperty('commands');
73  $this->assertEquals(
74  [['permission' => 'read', 'cmd' => 'view', 'lang_var' => 'show', 'default' => true]],
75  $commands_property->getValue($this->testObj)
76  );
77  }
78 
79  public function testGetProperties(): void
80  {
81  $this->assertEquals(
82  [[
83  'alert' => false,
84  'property' => '',
85  'value' => ''
86  ]],
87  $this->testObj->getProperties(),
88  );
89  }
90 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addGlobal_filesystem()
addGlobal_rbacsystem()
addGlobal_rbacreview()
Class ilObjTestVerificationListGUI.
addGlobal_ilLoggerFactory()
addGlobal_ilObjDataCache()