This commit is contained in:
Roland Gruber 2016-12-26 17:40:25 +01:00
parent 59d22b6652
commit fe4fa15ee7
2 changed files with 52 additions and 4 deletions

View File

@ -21,10 +21,10 @@
*/
include_once (dirname ( __FILE__ ) . '/../../../lib/baseModule.inc');
include_once (dirname ( __FILE__ ) . '/../../../lib/modules.inc');
include_once (dirname ( __FILE__ ) . '/../../../lib/passwordExpirationJob.inc');
include_once (dirname ( __FILE__ ) . '/../../../lib/modules/ppolicyUser.inc');
include_once '../../../lib/baseModule.inc';
include_once '../../../lib/modules.inc';
include_once '../../../lib/passwordExpirationJob.inc';
include_once '../../../lib/modules/ppolicyUser.inc';
/**
* Checks the ppolicy expire job.

View File

@ -0,0 +1,48 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2016 Roland Gruber
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
require_once '../../lib/types.inc';
/**
* Checks ListAttribute.
*
* @author Roland Gruber
*
*/
class ListAttributeTest extends PHPUnit_Framework_TestCase {
public function testPreTranslated() {
$attr = new \LAM\TYPES\ListAttribute('#uid', 'user');
$this->assertEquals('User name', $attr->getAlias());
$this->assertEquals('uid', $attr->getAttributeName());
}
public function testCustomAlias() {
$attr = new \LAM\TYPES\ListAttribute('uid:My translation', 'user');
$this->assertEquals('My translation', $attr->getAlias());
$this->assertEquals('uid', $attr->getAttributeName());
}
}
?>