Debian Codegraph @

lib/tools/tests.inc

raw
1 <?php
2
3 namespace LAM\TOOLS\TESTS;
4
5 use LAM\TYPES\TypeManager;
6 use LAMTool;
7
8 /*
9
10 This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
11 Copyright (C) 2009 - 2024 Roland Gruber
12
13 This program is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
17
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
27 */
28
29 /**
30 * This file includes the test tool specification.
31 *
32 * @author Roland Gruber
33 * @package tools
34 */
35
36 /**
37 * Tests page
38 *
39 * @package tools
40 */
41 class toolTests extends LAMTool {
42
43 /**
44 * {@inheritDoc}
45 */
46 public function getName(): string {
47 return _("Tests");
48 }
49
50 /**
51 * {@inheritDoc}
52 */
53 public function getDescription(): string {
54 return _("Here you can test if certain LAM features work on your installation.");
55 }
56
57 /**
58 * {@inheritDoc}
59 */
60 public function getLink(): string {
61 return "tests/index.php";
62 }
63
64 /**
65 * {@inheritDoc}
66 */
67 public function getRequiresWriteAccess(): bool {
68 return true;
69 }
70
71 /**
72 * {@inheritDoc}
73 */
74 public function getRequiresPasswordChangeRights(): bool {
75 return true;
76 }
77
78 /**
79 * {@inheritDoc}
80 */
81 public function getImageLink(): string {
82 return 'search-color.svg';
83 }
84
85 /**
86 * {@inheritDoc}
87 */
88 public function getPosition(): int {
89 return 1000;
90 }
91
92 /**
93 * {@inheritDoc}
94 */
95 public function isVisible(): bool {
96 $typeManager = new TypeManager();
97 $types = $typeManager->getConfiguredTypes();
98 return (count($types) > 0);
99 }
100
101 }