Merge pull request #14 from LDAPAccountManager/type_api_tmp
Type api tmp
This commit is contained in:
commit
8a432792ee
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"require-dev" : {
|
"require-dev" : {
|
||||||
"phpunit/phpunit" : "5.5.*",
|
"phpunit/phpunit" : "4.5.0",
|
||||||
"squizlabs/php_codesniffer" : "2.7.1"
|
"squizlabs/php_codesniffer" : "2.7.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
namespace LAM\TOOLS\UPLOAD;
|
||||||
/*
|
/*
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2009 - 2011 Roland Gruber
|
Copyright (C) 2009 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -33,7 +34,7 @@ $Id$
|
||||||
*
|
*
|
||||||
* @package tools
|
* @package tools
|
||||||
*/
|
*/
|
||||||
class toolFileUpload implements LAMTool {
|
class toolFileUpload implements \LAMTool {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the tool.
|
* Returns the name of the tool.
|
||||||
|
@ -114,7 +115,9 @@ class toolFileUpload implements LAMTool {
|
||||||
* @return boolean visible
|
* @return boolean visible
|
||||||
*/
|
*/
|
||||||
function isVisible() {
|
function isVisible() {
|
||||||
return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0);
|
$typeManager = new \LAM\TYPES\TypeManager();
|
||||||
|
$types = $typeManager->getConfiguredTypes();
|
||||||
|
return (sizeof($types) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
namespace LAM\TOOLS\MULTI_EDIT;
|
||||||
/*
|
/*
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2013 Roland Gruber
|
Copyright (C) 2013 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -33,7 +34,7 @@ $Id$
|
||||||
*
|
*
|
||||||
* @package tools
|
* @package tools
|
||||||
*/
|
*/
|
||||||
class toolMultiEdit implements LAMTool {
|
class toolMultiEdit implements \LAMTool {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the tool.
|
* Returns the name of the tool.
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
namespace LAM\TOOLS\OU_EDIT;
|
||||||
/*
|
/*
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2009 - 2011 Roland Gruber
|
Copyright (C) 2009 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -33,7 +34,7 @@ $Id$
|
||||||
*
|
*
|
||||||
* @package tools
|
* @package tools
|
||||||
*/
|
*/
|
||||||
class toolOUEditor implements LAMTool {
|
class toolOUEditor implements \LAMTool {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the tool.
|
* Returns the name of the tool.
|
||||||
|
@ -114,7 +115,9 @@ class toolOUEditor implements LAMTool {
|
||||||
* @return boolean visible
|
* @return boolean visible
|
||||||
*/
|
*/
|
||||||
function isVisible() {
|
function isVisible() {
|
||||||
return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0);
|
$typeManager = new \LAM\TYPES\TypeManager();
|
||||||
|
$types = $typeManager->getConfiguredTypes();
|
||||||
|
return (sizeof($types) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
namespace LAM\TOOLS\PDF_EDITOR;
|
||||||
/*
|
/*
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2009 - 2011 Roland Gruber
|
Copyright (C) 2009 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -33,7 +34,7 @@ $Id$
|
||||||
*
|
*
|
||||||
* @package tools
|
* @package tools
|
||||||
*/
|
*/
|
||||||
class toolPDFEditor implements LAMTool {
|
class toolPDFEditor implements \LAMTool {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the tool.
|
* Returns the name of the tool.
|
||||||
|
@ -114,7 +115,9 @@ class toolPDFEditor implements LAMTool {
|
||||||
* @return boolean visible
|
* @return boolean visible
|
||||||
*/
|
*/
|
||||||
function isVisible() {
|
function isVisible() {
|
||||||
return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0);
|
$typeManager = new \LAM\TYPES\TypeManager();
|
||||||
|
$types = $typeManager->getConfiguredTypes();
|
||||||
|
return (sizeof($types) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
namespace LAM\TOOLS\PROFILE_EDITOR;
|
||||||
/*
|
/*
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2009 - 2011 Roland Gruber
|
Copyright (C) 2009 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -33,7 +34,7 @@ $Id$
|
||||||
*
|
*
|
||||||
* @package tools
|
* @package tools
|
||||||
*/
|
*/
|
||||||
class toolProfileEditor implements LAMTool {
|
class toolProfileEditor implements \LAMTool {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the tool.
|
* Returns the name of the tool.
|
||||||
|
@ -114,7 +115,9 @@ class toolProfileEditor implements LAMTool {
|
||||||
* @return boolean visible
|
* @return boolean visible
|
||||||
*/
|
*/
|
||||||
function isVisible() {
|
function isVisible() {
|
||||||
return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0);
|
$typeManager = new \LAM\TYPES\TypeManager();
|
||||||
|
$types = $typeManager->getConfiguredTypes();
|
||||||
|
return (sizeof($types) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
namespace LAM\TOOLS\SCHEMA;
|
||||||
/*
|
/*
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
|
@ -33,7 +34,7 @@ $Id$
|
||||||
*
|
*
|
||||||
* @package tools
|
* @package tools
|
||||||
*/
|
*/
|
||||||
class toolSchemaBrowser implements LAMTool {
|
class toolSchemaBrowser implements \LAMTool {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the tool.
|
* Returns the name of the tool.
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
namespace LAM\TOOLS\SERVER_INFO;
|
||||||
/*
|
/*
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2009 - 2011 Roland Gruber
|
Copyright (C) 2009 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -33,7 +34,7 @@ $Id$
|
||||||
*
|
*
|
||||||
* @package tools
|
* @package tools
|
||||||
*/
|
*/
|
||||||
class toolServerInformation implements LAMTool {
|
class toolServerInformation implements \LAMTool {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the tool.
|
* Returns the name of the tool.
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
namespace LAM\TOOLS\TESTS;
|
||||||
/*
|
/*
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2009 - 2011 Roland Gruber
|
Copyright (C) 2009 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -33,7 +34,7 @@ $Id$
|
||||||
*
|
*
|
||||||
* @package tools
|
* @package tools
|
||||||
*/
|
*/
|
||||||
class toolTests implements LAMTool {
|
class toolTests implements \LAMTool {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the tool.
|
* Returns the name of the tool.
|
||||||
|
@ -106,13 +107,13 @@ class toolTests implements LAMTool {
|
||||||
*/
|
*/
|
||||||
function getSubTools() {
|
function getSubTools() {
|
||||||
$return = array();
|
$return = array();
|
||||||
$lamdaemonTest = new LAMSubTool();
|
$lamdaemonTest = new \LAMSubTool();
|
||||||
$lamdaemonTest->name = _("Lamdaemon test");
|
$lamdaemonTest->name = _("Lamdaemon test");
|
||||||
$lamdaemonTest->link = 'tests/lamdaemonTest.php';
|
$lamdaemonTest->link = 'tests/lamdaemonTest.php';
|
||||||
$lamdaemonTest->description = _("Check if quotas and homedirectories can be managed.");
|
$lamdaemonTest->description = _("Check if quotas and homedirectories can be managed.");
|
||||||
$lamdaemonTest->image = 'lamdaemonSmall.png';
|
$lamdaemonTest->image = 'lamdaemonSmall.png';
|
||||||
$return[] = $lamdaemonTest;
|
$return[] = $lamdaemonTest;
|
||||||
$schemaTest = new LAMSubTool();
|
$schemaTest = new \LAMSubTool();
|
||||||
$schemaTest->name = _("Schema test");
|
$schemaTest->name = _("Schema test");
|
||||||
$schemaTest->link = 'tests/schemaTest.php';
|
$schemaTest->link = 'tests/schemaTest.php';
|
||||||
$schemaTest->description = _("Check if the LDAP schema fits the requirements of the selected account modules.");
|
$schemaTest->description = _("Check if the LDAP schema fits the requirements of the selected account modules.");
|
||||||
|
@ -127,7 +128,9 @@ class toolTests implements LAMTool {
|
||||||
* @return boolean visible
|
* @return boolean visible
|
||||||
*/
|
*/
|
||||||
function isVisible() {
|
function isVisible() {
|
||||||
return (sizeof($_SESSION['config']->get_ActiveTypes()) > 0);
|
$typeManager = new \LAM\TYPES\TypeManager();
|
||||||
|
$types = $typeManager->getConfiguredTypes();
|
||||||
|
return (sizeof($types) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,22 @@
|
||||||
<?php
|
<?php
|
||||||
|
namespace LAM\TOOLS\MULTI_EDIT;
|
||||||
|
use \htmlTable;
|
||||||
|
use \htmlTitle;
|
||||||
|
use \htmlSelect;
|
||||||
|
use \htmlOutputText;
|
||||||
|
use \htmlHelpLink;
|
||||||
|
use \htmlInputField;
|
||||||
|
use \htmlSubTitle;
|
||||||
|
use \htmlTableExtendedInputField;
|
||||||
|
use \htmlButton;
|
||||||
|
use \htmlStatusMessage;
|
||||||
|
use \htmlSpacer;
|
||||||
|
use \htmlHiddenInput;
|
||||||
|
use \htmlGroup;
|
||||||
|
use \htmlDiv;
|
||||||
|
use \htmlJavaScript;
|
||||||
|
use \htmlLink;
|
||||||
|
use \htmlInputTextarea;
|
||||||
/*
|
/*
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
|
@ -85,11 +103,15 @@ function displayStartPage() {
|
||||||
$hideRules = array();
|
$hideRules = array();
|
||||||
$container->addElement(new htmlOutputText(_('LDAP suffix')));
|
$container->addElement(new htmlOutputText(_('LDAP suffix')));
|
||||||
$suffixGroup = new htmlTable();
|
$suffixGroup = new htmlTable();
|
||||||
$types = $_SESSION['config']->get_ActiveTypes();
|
$typeManager = new \LAM\TYPES\TypeManager();
|
||||||
|
$types = $typeManager->getConfiguredTypes();
|
||||||
$suffixes = array();
|
$suffixes = array();
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
$suffixes[LAM\TYPES\getTypeAlias($type)] = $_SESSION['config']->get_Suffix($type);
|
if ($type->isHidden()) {
|
||||||
$hideRules[$_SESSION['config']->get_Suffix($type)] = array('otherSuffix');
|
continue;
|
||||||
|
}
|
||||||
|
$suffixes[$type->getAlias()] = $type->getSuffix();
|
||||||
|
$hideRules[$type->getSuffix()] = array('otherSuffix');
|
||||||
}
|
}
|
||||||
$treeSuffix = $_SESSION['config']->get_Suffix('tree');
|
$treeSuffix = $_SESSION['config']->get_Suffix('tree');
|
||||||
if (!empty($treeSuffix)) {
|
if (!empty($treeSuffix)) {
|
||||||
|
|
|
@ -1,4 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
|
namespace LAM\TOOLS\OU_EDIT;
|
||||||
|
use \htmlTable;
|
||||||
|
use \htmlSpacer;
|
||||||
|
use \htmlOutputText;
|
||||||
|
use \htmlButton;
|
||||||
|
use \htmlHiddenInput;
|
||||||
|
use \htmlSubTitle;
|
||||||
|
use \htmlStatusMessage;
|
||||||
|
use \htmlSelect;
|
||||||
|
use \htmlHelpLink;
|
||||||
|
use \htmlInputField;
|
||||||
/*
|
/*
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
|
@ -51,8 +62,6 @@ if (!empty($_POST)) {
|
||||||
validateSecurityToken();
|
validateSecurityToken();
|
||||||
}
|
}
|
||||||
|
|
||||||
$types = $_SESSION['config']->get_ActiveTypes();
|
|
||||||
|
|
||||||
// check if deletion was canceled
|
// check if deletion was canceled
|
||||||
if (isset($_POST['abort'])) {
|
if (isset($_POST['abort'])) {
|
||||||
display_main(null, null);
|
display_main(null, null);
|
||||||
|
@ -166,13 +175,14 @@ function display_main($message, $error) {
|
||||||
$container->addElement($msg, true);
|
$container->addElement($msg, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$typeManager = new \LAM\TYPES\TypeManager();
|
||||||
|
$typeList = $typeManager->getConfiguredTypes();
|
||||||
$types = array();
|
$types = array();
|
||||||
$typeList = $_SESSION['config']->get_ActiveTypes();
|
foreach ($typeList as $type) {
|
||||||
for ($i = 0; $i < sizeof($typeList); $i++) {
|
if ($type->isHidden() || !checkIfWriteAccessIsAllowed($type->getId())) {
|
||||||
if (isAccountTypeHidden($typeList[$i]) || !checkIfWriteAccessIsAllowed($typeList[$i])) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$types[$typeList[$i]] = LAM\TYPES\getTypeAlias($typeList[$i]);
|
$types[$type->getId()] = $type->getAlias();
|
||||||
}
|
}
|
||||||
natcasesort($types);
|
natcasesort($types);
|
||||||
$options = array();
|
$options = array();
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once (dirname ( __FILE__ ) . '/../utils/configuration.inc');
|
include_once 'lam/tests/utils/configuration.inc';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* LAMConfig test case.
|
* LAMConfig test case.
|
||||||
|
|
|
@ -21,18 +21,20 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once '../../../lib/baseModule.inc';
|
if (is_readable('lam/lib/modules/ppolicyUser.inc')) {
|
||||||
include_once '../../../lib/modules.inc';
|
|
||||||
include_once '../../../lib/passwordExpirationJob.inc';
|
|
||||||
include_once '../../../lib/modules/ppolicyUser.inc';
|
|
||||||
|
|
||||||
/**
|
include_once 'lam/lib/baseModule.inc';
|
||||||
|
include_once 'lam/lib/modules.inc';
|
||||||
|
include_once 'lam/lib/passwordExpirationJob.inc';
|
||||||
|
include_once 'lam/lib/modules/ppolicyUser.inc';
|
||||||
|
|
||||||
|
/**
|
||||||
* Checks the ppolicy expire job.
|
* Checks the ppolicy expire job.
|
||||||
*
|
*
|
||||||
* @author Roland Gruber
|
* @author Roland Gruber
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class PPolicyUserPasswordNotifyJobTest extends PHPUnit_Framework_TestCase {
|
class PPolicyUserPasswordNotifyJobTest extends PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
private $job;
|
private $job;
|
||||||
|
|
||||||
|
@ -214,7 +216,8 @@ class PPolicyUserPasswordNotifyJobTest extends PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -21,10 +21,9 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once (dirname ( __FILE__ ) . '/../../../lib/baseModule.inc');
|
include_once 'lam/lib/baseModule.inc';
|
||||||
include_once (dirname ( __FILE__ ) . '/../../../lib/modules.inc');
|
include_once 'lam/lib/modules.inc';
|
||||||
include_once (dirname ( __FILE__ ) . '/../../../lib/passwordExpirationJob.inc');
|
include_once 'lam/lib/modules/sambaSamAccount.inc';
|
||||||
include_once (dirname ( __FILE__ ) . '/../../../lib/modules/sambaSamAccount.inc');
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks the shadow expire job.
|
* Checks the shadow expire job.
|
||||||
|
|
|
@ -21,18 +21,20 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once (dirname ( __FILE__ ) . '/../../../lib/baseModule.inc');
|
if (is_readable('lam/lib/passwordExpirationJob.inc')) {
|
||||||
include_once (dirname ( __FILE__ ) . '/../../../lib/modules.inc');
|
|
||||||
include_once (dirname ( __FILE__ ) . '/../../../lib/passwordExpirationJob.inc');
|
|
||||||
include_once (dirname ( __FILE__ ) . '/../../../lib/modules/shadowAccount.inc');
|
|
||||||
|
|
||||||
/**
|
include_once 'lam/lib/baseModule.inc';
|
||||||
|
include_once 'lam/lib/modules.inc';
|
||||||
|
include_once 'lam/lib/passwordExpirationJob.inc';
|
||||||
|
include_once 'lam/lib/modules/shadowAccount.inc';
|
||||||
|
|
||||||
|
/**
|
||||||
* Checks the shadow expire job.
|
* Checks the shadow expire job.
|
||||||
*
|
*
|
||||||
* @author Roland Gruber
|
* @author Roland Gruber
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class ShadowAccountPasswordNotifyJobTest extends PHPUnit_Framework_TestCase {
|
class ShadowAccountPasswordNotifyJobTest extends PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
private $job;
|
private $job;
|
||||||
|
|
||||||
|
@ -159,7 +161,8 @@ class ShadowAccountPasswordNotifyJobTest extends PHPUnit_Framework_TestCase {
|
||||||
$this->job->execute(ShadowAccountPasswordNotifyJobTest::JOB_ID, $this->options, $pdo, true);
|
$this->job->execute(ShadowAccountPasswordNotifyJobTest::JOB_ID, $this->options, $pdo, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2014 Roland Gruber
|
Copyright (C) 2014 - 2016 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -21,16 +21,18 @@ $Id$
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
include_once (dirname ( __FILE__ ) . '/../../../lib/baseModule.inc');
|
if (is_readable('lam/lib/modules/sudoRole.inc')) {
|
||||||
include_once (dirname ( __FILE__ ) . '/../../../lib/modules/sudoRole.inc');
|
|
||||||
|
|
||||||
/**
|
include_once 'lam/lib/baseModule.inc';
|
||||||
|
include_once 'lam/lib/modules/sudoRole.inc';
|
||||||
|
|
||||||
|
/**
|
||||||
* Checks sudo role functions.
|
* Checks sudo role functions.
|
||||||
*
|
*
|
||||||
* @author Roland Gruber
|
* @author Roland Gruber
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class SudoRoleTest extends PHPUnit_Framework_TestCase {
|
class SudoRoleTest extends PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
public function testIsValidDate() {
|
public function testIsValidDate() {
|
||||||
$valid = array('22.10.2014', '05.01.2013', '1.3.2014', '10.5.2014', '4.12.2015',
|
$valid = array('22.10.2014', '05.01.2013', '1.3.2014', '10.5.2014', '4.12.2015',
|
||||||
|
@ -76,6 +78,8 @@ class SudoRoleTest extends PHPUnit_Framework_TestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -23,8 +23,8 @@ $Id$
|
||||||
|
|
||||||
$_SERVER ['REMOTE_ADDR'] = '127.0.0.1';
|
$_SERVER ['REMOTE_ADDR'] = '127.0.0.1';
|
||||||
|
|
||||||
include_once (dirname ( __FILE__ ) . '/../utils/configuration.inc');
|
include_once 'lam/tests/utils/configuration.inc';
|
||||||
include_once (dirname ( __FILE__ ) . '/../../lib/security.inc');
|
include_once 'lam/lib/security.inc';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks password checking functions.
|
* Checks password checking functions.
|
||||||
|
|
|
@ -21,7 +21,7 @@ $Id$
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once '../../lib/types.inc';
|
require_once 'lam/lib/types.inc';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks ListAttribute.
|
* Checks ListAttribute.
|
||||||
|
|
|
@ -5,4 +5,10 @@
|
||||||
<directory>lam/tests</directory>
|
<directory>lam/tests</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
<php>
|
||||||
|
<includePath>.</includePath>
|
||||||
|
</php>
|
||||||
|
<logging>
|
||||||
|
<log type="coverage-html" target="../code-coverage/html"/>
|
||||||
|
</logging>
|
||||||
</phpunit>
|
</phpunit>
|
Loading…
Reference in New Issue