ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilRBACTest Class Reference

Unit tests for tree table. More...

+ Inheritance diagram for ilRBACTest:
+ Collaboration diagram for ilRBACTest:

Public Member Functions

 testRbacFA ()
 RBAC FA tests IL_Init.
 testRbacUA ()
 test rbac_ua IL_Init
 testRbacTA ()
 rbac ta test IL_Init
 testRbacPA ()
 test rbac_pa IL_Init
 testConditions ()
 test preconditions IL_Init
 testCache ()
 IL_Init
 testAssignUser ()
 Test Assign User Method DB: rbac_ua.
 testDeassignUser ()
 Test deassign user Method DB: rbac_ua.
 testGrantPermission ()
 Test grant Permission Method DB: rbac_pa.
 testRevokePermission ()
 Test revoke Permission Method DB: rbac_pa.
 testRevokeSubtreePermissions ()
 Test revokeSubtreePermissions Method DB: rbac_pa.
 testRevokePermissionList ()
 Test revokePermissionList Method DB: rbac_pa.
 testSetRolePermission ()
 Test Set Role Permission Method DB: rbac_template.
 testDeleteRolePermission ()
 Test Delete Role Permission Method DB: rbac_template.
 testCopyRoleTemplatePermissions ()
 Test Copy Role Template Permission Method DB: rbac_template.
 testCopyRolePermissions ()
 Test Method DB: rbac_template DB: rbac_pa.
 testCopyRolePermissionIntersection ()
 Test Copy Role Permission Intersection Method DB: rbac_template.
 testCopyRolePermissionUnion ()
 Test Copy Role Permission Union Method DB: rbac_template.
 testCopyRolePermissionSubtract ()
 Test Copy Role Permission Subtract Method DB: rbac_template.
 testAssignOperationToObject ()
 Test assignOperationToObject Method DB: rbac_ta.
 testDeassignOperationFromObject ()
 Test deassignOperationFromObject Method ilRbacReview $rbacreview ilRbacAdmin $rbacadmin testAssignOperationToObject.

Protected Member Functions

 setUp ()

Protected Attributes

 $backupGlobals = FALSE

Detailed Description

Unit tests for tree table.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 33 of file ilRBACTest.php.

Member Function Documentation

ilRBACTest::setUp ( )
protected

Definition at line 37 of file ilRBACTest.php.

{
include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
ilUnitUtil::performInitialisation();
}
ilRBACTest::testAssignOperationToObject ( )

Test assignOperationToObject Method DB: rbac_ta.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin

Definition at line 654 of file ilRBACTest.php.

{
global $rbacreview, $rbacadmin;
$rbacadmin->assignOperationToObject(1001,10);
$rbacadmin->assignOperationToObject(1001,20);
$this->assertEquals($rbacreview->getOperationsOnType(1001), array(10,20));
}
ilRBACTest::testAssignUser ( )

Test Assign User Method DB: rbac_ua.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin

Definition at line 186 of file ilRBACTest.php.

{
global $rbacreview, $rbacadmin;
//assign User 15 to role 10
$rbacadmin->assignUser(10,15);
$this->assertTrue($rbacreview->isAssigned(15,10));
//Test double assign
$rbacadmin->assignUser(10,15);
}
ilRBACTest::testCache ( )

IL_Init

Definition at line 166 of file ilRBACTest.php.

References $res.

{
include_once './Services/AccessControl/classes/class.ilAccessHandler.php';
$handler = new ilAccessHandler();
$handler->setResults(array(1,2,3));
$handler->storeCache();
$handler->readCache();
$res = $handler->getResults();
$this->assertEquals(array(1,2,3),$res);
}
ilRBACTest::testConditions ( )

test preconditions IL_Init

Parameters
@return

Definition at line 130 of file ilRBACTest.php.

References ilConditionHandler\_deleteTargetConditionsByRefId(), ilConditionHandler\_getCondition(), ilConditionHandler\_getConditionsOfTarget(), ilConditionHandler\_getConditionsOfTrigger(), and ilConditionHandler\_getDistinctTargetRefIds().

{
include_once './Services/AccessControl/classes/class.ilConditionHandler.php';
$handler = new ilConditionHandler();
$handler->setTargetRefId(99999);
$handler->setTargetObjId(99998);
$handler->setTargetType('xxx');
$handler->setTriggerRefId(99997);
$handler->setTriggerObjId(99996);
$handler->setTriggerType('yyy');
$handler->setReferenceHandlingType(0);
$handler->enableAutomaticValidation(false);
$suc = $handler->storeCondition();
$this->assertEquals($suc,true);
$suc = $handler->checkExists();
$this->assertEquals($suc,false);
$suc = $handler->delete(99999);
$this->assertEquals($suc,true);
// syntax check
$handler->deleteByObjId(-1);
$handler->deleteCondition(-1);
}

+ Here is the call graph for this function:

ilRBACTest::testCopyRolePermissionIntersection ( )

Test Copy Role Permission Intersection Method DB: rbac_template.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin testSetRolePermission

Definition at line 537 of file ilRBACTest.php.

{
global $rbacreview, $rbacadmin;
$rbacadmin->deleteTemplate(1010);
$rbacadmin->deleteTemplate(2020);
$rbacadmin->deleteTemplate(3030);
$rbacadmin->setRolePermission(1010,"a",array(10,11,13,15),1100);
$rbacadmin->setRolePermission(2020,"a",array(11,12,13,16),2200);
$rbacadmin->setRolePermission(1010,"b",array(20,22,23,25),1100);
$rbacadmin->setRolePermission(2020,"b",array(20,23,24,26),2200);
$rbacadmin->setRolePermission(3030,"c",array(30,33),3300);
$rbacadmin->setRolePermission(3030,"a",array(30,33),3300);
$rbacadmin->setRolePermission(3030,"b",array(30,33),3300);
$rbacadmin->copyRolePermissionIntersection(1010,1100,2020,2200,3300,3030);
$intersect = array("a" => array(11,13), "b" => array(20,23));
$dest = $rbacreview->getAllOperationsOfRole(3030,3300);
//sort
sort($dest["a"]);
sort($dest["b"]);
$this->assertEquals($intersect, $dest);
$rbacadmin->deleteTemplate(1010);
$rbacadmin->deleteTemplate(2020);
$rbacadmin->deleteTemplate(3030);
}
ilRBACTest::testCopyRolePermissions ( )

Test Method DB: rbac_template DB: rbac_pa.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin testGrantPermission testRevokePermission testSetRolePermission

Definition at line 468 of file ilRBACTest.php.

References $ilDB, and $row.

{
global $rbacreview, $rbacadmin, $ilDB;
$req = $ilDB->query("SELECT ref.ref_id FROM object_reference AS ref LEFT JOIN object_data AS data ON data.obj_id = ref.obj_id WHERE data.type='seas';");
$seas = 0;
while($row = $ilDB->fetchAssoc($req))
{
$seas = $row["ref_id"];
}
$req = $ilDB->query("SELECT ref.ref_id FROM object_reference AS ref LEFT JOIN object_data AS data ON data.obj_id = ref.obj_id WHERE data.type='mail';");
$mail = 0;
while($row = $ilDB->fetchAssoc($req))
{
$mail = $row["ref_id"];
}
$req = $ilDB->query("SELECT obj_id FROM object_data WHERE type='role';");
$ilDB->fetchAssoc($req);//First role is protected. Dont use it!
$role = $ilDB->fetchAssoc($req)["obj_id"];
//save normal operations
$opt_mail = $rbacreview->getActiveOperationsOfRole($mail, $role);
$opt_seas = $rbacreview->getActiveOperationsOfRole($seas, $role);
$opt_temp_seas = $rbacreview->getAllOperationsOfRole($role, $seas);
$opt_temp_mail = $rbacreview->getAllOperationsOfRole($role, $mail);
//set values
$rbacadmin->setRolePermission($role, "mail", array(1,2,3,4,5),$mail);
$rbacadmin->grantPermission($role, array(1,2,3,4,5), $mail);
$rbacadmin->setRolePermission($role, "seas", array(5,6,7,8,9),$seas);
$rbacadmin->grantPermission($role, array(5,6,7,8,9), $seas);
$rbacadmin->copyRolePermissions($role,$seas,$mail, $role);
$this->assertEquals($rbacreview->getActiveOperationsOfRole($seas, $role),
$rbacreview->getActiveOperationsOfRole($mail, $role));
//set normal operations
$rbacadmin->grantPermission($role,$opt_seas,$seas);
$rbacadmin->grantPermission($role,$opt_mail,$mail);
$rbacadmin->deleteRolePermission($role,$mail);
$rbacadmin->deleteRolePermission($role,$seas);
foreach($opt_temp_seas as $type => $opt)
{
$rbacadmin->setRolePermission($role, $type, $opt,$seas);
}
foreach($opt_temp_mail as $type => $opt)
{
$rbacadmin->setRolePermission($role, $type, $opt,$mail);
}
}
ilRBACTest::testCopyRolePermissionSubtract ( )

Test Copy Role Permission Subtract Method DB: rbac_template.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin testSetRolePermission

Definition at line 618 of file ilRBACTest.php.

{
global $rbacreview, $rbacadmin;
$rbacadmin->deleteTemplate(1010);
$rbacadmin->deleteTemplate(2020);
$rbacadmin->setRolePermission(1010,"a",array(10,11,13,15),1100);
$rbacadmin->setRolePermission(2020,"a",array(11,12,13,16),2200);
$rbacadmin->setRolePermission(1010,"b",array(20,22,23,25),1100);
$rbacadmin->setRolePermission(2020,"b",array(20,23,24,26),2200);
$rbacadmin->setRolePermission(2020,"c",array(30,33,34,35),2200);
$rbacadmin->copyRolePermissionSubtract(1010,1100,2020,2200);
$subtract = array("a" => array(12,16), "b" => array(24,26), "c" => array(30,33,34,35));
$dest = $rbacreview->getAllOperationsOfRole(2020,2200);
sort($dest["a"]);
sort($dest["b"]);
sort($dest["c"]);
$this->assertEquals($subtract, $dest);
$rbacadmin->deleteTemplate(1010);
$rbacadmin->deleteTemplate(2020);
}
ilRBACTest::testCopyRolePermissionUnion ( )

Test Copy Role Permission Union Method DB: rbac_template.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin testCopyRoleTemplatePermissions testSetRolePermission

Definition at line 579 of file ilRBACTest.php.

{
global $rbacreview, $rbacadmin;
$rbacadmin->deleteTemplate(1010);
$rbacadmin->deleteTemplate(2020);
$rbacadmin->deleteTemplate(3030);
$rbacadmin->setRolePermission(1010,"a",array(10,11,13,15),1100);
$rbacadmin->setRolePermission(2020,"a",array(11,12,13,16),2200);
$rbacadmin->setRolePermission(1010,"b",array(20,22,23,25),1100);
$rbacadmin->setRolePermission(2020,"b",array(20,23,24,26),2200);
$rbacadmin->setRolePermission(1010,"c",array(30,33,34,35),1100);
$rbacadmin->copyRolePermissionUnion(1010,1100,2020,2200,3030,3300);
$union = array("a" => array(10,11,12,13,15,16), "b" => array(20,22,23,24,25,26), "c" => array(30,33,34,35));
$dest = $rbacreview->getAllOperationsOfRole(3030,3300);
sort($dest["a"]);
sort($dest["b"]);
sort($dest["c"]);
$this->assertEquals($union, $dest);
$rbacadmin->deleteTemplate(1010);
$rbacadmin->deleteTemplate(2020);
$rbacadmin->deleteTemplate(3030);
}
ilRBACTest::testCopyRoleTemplatePermissions ( )

Test Copy Role Template Permission Method DB: rbac_template.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin testSetRolePermission

Definition at line 437 of file ilRBACTest.php.

{
global $rbacreview, $rbacadmin;
$rbacadmin->deleteTemplate(1010);
$rbacadmin->deleteTemplate(2020);
$rbacadmin->setRolePermission(1010,"blub",array(10,11),1100);
$rbacadmin->setRolePermission(2020,"bulb",array(20,22),2200);
$rbacadmin->copyRoleTemplatePermissions(1010,1100,2200,2020);
$one = $rbacreview->getAllOperationsOfRole(1010,1100);
$two = $rbacreview->getAllOperationsOfRole(2020,2200);
sort($one["blub"]);
sort($two["blub"]);
$this->assertEquals($one, $two);
$rbacadmin->deleteTemplate(1010);
$rbacadmin->deleteTemplate(2020);
}
ilRBACTest::testDeassignOperationFromObject ( )

Test deassignOperationFromObject Method ilRbacReview $rbacreview ilRbacAdmin $rbacadmin testAssignOperationToObject.

Definition at line 670 of file ilRBACTest.php.

{
global $rbacreview, $rbacadmin;
$rbacadmin->deassignOperationFromObject(1001,10);
$this->assertEquals($rbacreview->getOperationsOnType(1001), array(20));
$rbacadmin->deassignOperationFromObject(1001,20);
$this->assertEmpty($rbacreview->getOperationsOnType(1001));
}
ilRBACTest::testDeassignUser ( )

Test deassign user Method DB: rbac_ua.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin testAssignUser

Definition at line 206 of file ilRBACTest.php.

{
global $rbacreview, $rbacadmin;
//deassign User 15 from role 10
$rbacadmin->deassignUser(10,15);
$this->assertFalse($rbacreview->isAssigned(15,10));
}
ilRBACTest::testDeleteRolePermission ( )

Test Delete Role Permission Method DB: rbac_template.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin testSetRolePermission

Definition at line 402 of file ilRBACTest.php.

{
global $rbacreview, $rbacadmin;
$rbacadmin->deleteTemplate(1010);
$rbacadmin->setRolePermission(1010,"a",array(10,11,13,15),1100);
$rbacadmin->setRolePermission(1010,"b",array(20,22,23,25),1100);
$rbacadmin->deleteRolePermission(1010,1100);
$this->assertEmpty($rbacreview->getAllOperationsOfRole(1010,1100));
$rbacadmin->setRolePermission(1010,"a",array(10,11,13,15),1100);
$rbacadmin->setRolePermission(1010,"b",array(20,22,23,25),1100);
$rbacadmin->deleteRolePermission(1010,1100, "a");
$assert = array("b" => array(20,22,23,25));
$dest = $rbacreview->getAllOperationsOfRole(1010,1100);
sort($dest["b"]);
$this->assertEquals($assert, $dest);
$rbacadmin->deleteTemplate(1010);
}
ilRBACTest::testGrantPermission ( )

Test grant Permission Method DB: rbac_pa.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin

Definition at line 222 of file ilRBACTest.php.

{
global $rbacreview, $rbacadmin;
//grant permissions 10,20 and 30 for role 10 on object 60
$rbacadmin->grantPermission(10,array(10,20,30),60);
$this->assertEquals($rbacreview->getActiveOperationsOfRole(60,10), array(10,20,30));
}
ilRBACTest::testRbacFA ( )

RBAC FA tests IL_Init.

Parameters
@return

Definition at line 49 of file ilRBACTest.php.

{
global $rbacreview,$rbacadmin;
// Protected
#$rbacadmin->setProtected(1,4,'y');
#$prot = $rbacreview->isProtected(8,4);
#$this->assertEquals($prot,true);
#$rbacadmin->setProtected(1,4,'n');
#$prot = $rbacreview->isProtected(8,4);
#$this->assertEquals($prot,false);
$rbacreview->getRoleListByObject(8);
$rbacreview->getAssignableRoles();
$ass = $rbacreview->isAssignable(4,8);
$this->assertEquals($ass,true);
$roles = $rbacreview->getRolesOfObject(8);
$obj = $rbacreview->getObjectOfRole(4);
$this->assertEquals(8,$obj);
}
ilRBACTest::testRbacPA ( )

test rbac_pa IL_Init

Definition at line 113 of file ilRBACTest.php.

{
global $rbacreview,$rbacadmin;
$sess_ops = $rbacreview->getOperationsOnTypeString('cat');
$rbacadmin->revokePermission(1,4);
$rbacadmin->grantPermission(4,array(2,3),1);
}
ilRBACTest::testRbacTA ( )

rbac ta test IL_Init

Parameters
@return

Definition at line 94 of file ilRBACTest.php.

{
global $rbacreview,$rbacadmin;
$sess_ops = $rbacreview->getOperationsOnTypeString('sess');
$rbacadmin->assignOperationToObject($rbacreview->getTypeId('sess'),'7');
//$new_sess_ops = $rbacreview->getOperationsOnTypeString('sess');
//$this->assertEquals(array_merge($sess_ops,array(7)),$new_sess_ops);
$rbacadmin->deassignOperationFromObject($rbacreview->getTypeId('sess'),'7');
$new_sess_ops = $rbacreview->getOperationsOnTypeString('sess');
$this->assertEquals($sess_ops,$new_sess_ops);
}
ilRBACTest::testRbacUA ( )

test rbac_ua IL_Init

Definition at line 78 of file ilRBACTest.php.

References ilUtil\_getObjectsByOperations().

{
global $rbacreview,$rbacadmin;
$obj = ilUtil::_getObjectsByOperations('crs','join');
$rbacreview->assignedUsers(4);
$rbacreview->assignedRoles(6);
}

+ Here is the call graph for this function:

ilRBACTest::testRevokePermission ( )

Test revoke Permission Method DB: rbac_pa.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin testGrantPermission

Definition at line 240 of file ilRBACTest.php.

References $ilDB, $ref_id, and $row.

{
global $rbacreview, $rbacadmin, $ilDB;
$req = $ilDB->query("SELECT ref.ref_id FROM object_reference AS ref LEFT JOIN object_data AS data ON data.obj_id = ref.obj_id WHERE data.type='seas';");
$ref_id = 0;
while($row = $ilDB->fetchAssoc($req))
{
$ref_id = $row["ref_id"];
}
$req = $ilDB->query("SELECT obj_id FROM object_data WHERE type='role';");
$ilDB->fetchAssoc($req);//First role is protected. Dont use it!
$role1 = $ilDB->fetchAssoc($req)["obj_id"];
$role2 = $ilDB->fetchAssoc($req)["obj_id"];
$role3 = $ilDB->fetchAssoc($req)["obj_id"];
//save normal operations
$opt1 = $rbacreview->getActiveOperationsOfRole($ref_id,$role1);
$opt2 = $rbacreview->getActiveOperationsOfRole($ref_id,$role2);
$opt3 = $rbacreview->getActiveOperationsOfRole($ref_id,$role3);
$rbacadmin->grantPermission($role1, array(1,2,3,4,5), $ref_id);
$rbacadmin->grantPermission($role2, array(1,2,3,4,5), $ref_id);
//$this->assertEquals($rbacreview->getActiveOperationsOfRole($ref_id,$role1), array(1,2,3,4,5));
//$this->assertEquals($rbacreview->getActiveOperationsOfRole($ref_id,$role2), array(1,2,3,4,5));
$rbacadmin->revokePermission($ref_id);
$this->assertEmpty($rbacreview->getActiveOperationsOfRole($ref_id,$role1));
$this->assertEmpty($rbacreview->getActiveOperationsOfRole($ref_id,$role2));
$rbacadmin->grantPermission($role1, array(1,2,3,4,5), $ref_id);
//$this->assertEquals($rbacreview->getActiveOperationsOfRole($ref_id,$role1), array(1,2,3,4,5));
$rbacadmin->revokePermission($ref_id, $role1);
$this->assertEmpty($rbacreview->getActiveOperationsOfRole($ref_id,$role1));
$rbacadmin->grantPermission($role2, array(1,2,3,4,5), $ref_id);
$rbacadmin->grantPermission($role3, array(1,2,3,4,5), $ref_id);
//$this->assertEquals($rbacreview->getActiveOperationsOfRole($ref_id,$role2), array(1,2,3,4,5));
//$this->assertEquals($rbacreview->getActiveOperationsOfRole($ref_id,$role3), array(1,2,3,4,5));
$rbacadmin->revokePermission($ref_id,0,false);
$this->assertEmpty($rbacreview->getActiveOperationsOfRole($ref_id,$role2));
$this->assertEmpty($rbacreview->getActiveOperationsOfRole($ref_id,$role3));
$rbacadmin->grantPermission($role3, array(1,2,3,4,5), $ref_id);
//$this->assertEquals($rbacreview->getActiveOperationsOfRole($ref_id,$role3), array(1,2,3,4,5));
$rbacadmin->revokePermission($ref_id, $role3, false);
$this->assertEmpty($rbacreview->getActiveOperationsOfRole($ref_id,$role3));
//set normal operations
$rbacadmin->grantPermission($role1, $opt1, $ref_id);
$rbacadmin->grantPermission($role2, $opt2, $ref_id);
$rbacadmin->grantPermission($role3, $opt3, $ref_id);
}
ilRBACTest::testRevokePermissionList ( )

Test revokePermissionList Method DB: rbac_pa.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin testGrantPermission

Definition at line 350 of file ilRBACTest.php.

{
global $rbacreview, $rbacadmin;
$list = array(1001, 1003, 1005, 1007);
foreach($list as $id)
{
$rbacadmin->grantPermission(123, array(1,2,3,4,5),$id);
}
$rbacadmin->revokePermissionList($list, 123);
foreach($list as $id)
{
$this->assertEmpty($rbacreview->getActiveOperationsOfRole($id,123));
}
}
ilRBACTest::testRevokeSubtreePermissions ( )

Test revokeSubtreePermissions Method DB: rbac_pa.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin testGrantPermission

Definition at line 306 of file ilRBACTest.php.

References $ilDB, $ref_id, and $row.

{
global $rbacreview, $rbacadmin, $tree, $ilDB;
$req = $ilDB->query("SELECT ref.ref_id FROM object_reference AS ref LEFT JOIN object_data AS data ON data.obj_id = ref.obj_id WHERE data.type='adm';");
$ref_id = 0;
while($row = $ilDB->fetchAssoc($req))
{
$ref_id = $row["ref_id"];
}
$childs = $tree->getChildIds($ref_id);
$req = $ilDB->query("SELECT obj_id FROM object_data WHERE type='role';");
$ilDB->fetchAssoc($req);//First role is protected. Dont use it!
$role = $ilDB->fetchAssoc($req)["obj_id"];
$ops = array();
foreach($childs as $id)
{
$ops[$id] = $rbacreview->getActiveOperationsOfRole($id,$role);//save normal operations
$rbacadmin->grantPermission($role, array(1,2,3,4,5),$id);
//$this->assertEquals($rbacreview->getActiveOperationsOfRole($id,$role), array(1,2,3,4,5));
}
$rbacadmin->revokeSubtreePermissions($ref_id,$role);
foreach($childs as $id)
{
$this->assertEmpty($rbacreview->getActiveOperationsOfRole($id,$role));
$rbacadmin->grantPermission($role, $ops[$id],$id);//set normal operations
}
}
ilRBACTest::testSetRolePermission ( )

Test Set Role Permission Method DB: rbac_template.

ilRbacReview $rbacreview ilRbacAdmin $rbacadmin

Definition at line 375 of file ilRBACTest.php.

{
global $rbacreview, $rbacadmin;
$rbacadmin->deleteTemplate(1010);
$rbacadmin->setRolePermission(1010,"a",array(10,11,13,15),1100);
$rbacadmin->setRolePermission(1010,"b",array(20,22,23,25),1100);
$assert = array("a" => array(10,11,13,15),"b" => array(20,22,23,25));
$dest = $rbacreview->getAllOperationsOfRole(1010,1100);
sort($dest["a"]);
sort($dest["b"]);
$this->assertEquals($assert, $dest);
$rbacadmin->deleteTemplate(1010);
}

Field Documentation

ilRBACTest::$backupGlobals = FALSE
protected

Definition at line 35 of file ilRBACTest.php.


The documentation for this class was generated from the following file: