[geeklog-cvs] Auth_Enterprise/tests groupTest.php,NONE,1.1 privilegeTest.php,NONE,1.1

tony at iowaoutdoors.org tony at iowaoutdoors.org
Wed Jul 28 17:03:58 EDT 2004


Update of /var/cvs/Auth_Enterprise/tests
In directory www:/tmp/cvs-serv5007

Added Files:
	groupTest.php privilegeTest.php 
Log Message:
Some of the most basic simplist tests.  I'm still rough around the edges with PHPUnit2


--- NEW FILE: privilegeTest.php ---
<?php

require_once 'PHPUnit2/Framework/TestCase.php';

require_once 'Auth/Enterprise/Privilege.php';

/**
* Auth_Enterprise
*
* This source file is subject to version 2.02 of the PHP license, that is bundled with this package
* in the file LICENSE, and is available at through the world-wide-web at
* http://www.php.net/license/2_02.txt. If you did not receive a copy of the PHP license and are
* unable to obtain it through the world-wide-web, please send a note to license at php.net so we can
* mail you a copy immediately.
*
* @author Tony Bibbs <tony at geeklog.net>
* @copyright 2004
* @version $Id: privilegeTest.php,v 1.1 2004/07/28 21:03:55 tony Exp $
*
*/

/**
* Tests the privilege class
*
* @author Tony Bibbs <tony at geeklog.net>
* @package net.geeklog.auth_enterprise.tests
*
*/
class privilegeTest extends PHPUnit2_Framework_TestCase {
     public function testPrivilegeObject()
     {
        $priv = new Auth_Enterprise_Privilege('InitialCode', 'InitialDesc');
        $this->assertEquals('InitialCode', $priv->getPrivilegeCode());
        $this->assertEquals('InitialDesc', $priv->getPrivilegeDesc());
        $priv->setPrivilegeCode('SecondCode');
        $this->assertEquals('SecondCode', $priv->getPrivilegeCode());
        $priv->setPrivilegeDesc('SecondDesc');
        $this->assertEquals('SecondDesc', $priv->getPrivilegeDesc());
     }
}


?>
--- NEW FILE: groupTest.php ---
<?php

require_once 'PHPUnit2/Framework/TestCase.php';

require_once 'Auth/Enterprise/Group.php';

/**
* Auth_Enterprise
*
* This source file is subject to version 2.02 of the PHP license, that is bundled with this package
* in the file LICENSE, and is available at through the world-wide-web at
* http://www.php.net/license/2_02.txt. If you did not receive a copy of the PHP license and are
* unable to obtain it through the world-wide-web, please send a note to license at php.net so we can
* mail you a copy immediately.
*
* @author Tony Bibbs <tony at geeklog.net>
* @copyright 2004
* @version $Id: groupTest.php,v 1.1 2004/07/28 21:03:55 tony Exp $
*
*/

/**
* Tests the group class
*
* @author Tony Bibbs <tony at geeklog.net>
* @package net.geeklog.auth_enterprise.tests
*
*/
class groupTest extends PHPUnit2_Framework_TestCase {
     public function testGroupObject()
     {
        $group = new Auth_Enterprise_Group();
        $group->setGroupId('InitialGroupId');
        $group->setGroupLogicalName('InitialGroupLogicalName');
        $group->setGroupDisplayName('InitialGroupDisplayName');
        $group->setGroupDesc('InitialGroupDesc');
        $this->assertEquals('InitialGroupId', $group->getGroupId());
        $this->assertEquals('InitialGroupLogicalName', $group->getGroupLogicalName());
        $this->assertEquals('InitialGroupDisplayName', $group->getGroupDisplayName());
        $this->assertEquals('InitialGroupDesc', $group->getGroupDesc());
     }
}


?>



More information about the geeklog-cvs mailing list