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