AccountReadPermissionsSubscriptionUtilTest Class Reference

Inheritance diagram for AccountReadPermissionsSubscriptionUtilTest:
ZurmoBaseTest BaseTest

Public Member Functions

 setUp ()
 testGroupChangeOrDeleteScenario1 ()
 testGroupChangeOrDeleteScenario2 ()
 testGroupChangeOrDeleteScenario3 ()
 testGroupChangeOrDeleteScenario4 ()
 testGroupChangeOrDeleteScenario5 ()
 testRoleChangeOrDeleteScenario1 ()
 testRoleChangeOrDeleteScenario2 ()
 testRoleChangeOrDeleteScenario3 ()
 testRoleChangeOrDeleteScenario4 ()
 testUserCreationsAndPermissions ()
 testSecurableItemGivenOrLostPermissionsForGroup ()
 testSecurableItemGivenOrLostPermissionsForUser ()

Static Public Member Functions

static setUpBeforeClass ()
static tearDownAfterClass ()

Protected Member Functions

 deleteAllModelsAndRecordsFromReadPermissionTable ($modelClassName)

Static Protected Attributes

static $johnny
static $billy
static $david

Detailed Description

Definition at line 37 of file AccountReadPermissionsSubscriptionUtilTest.php.

Member Function Documentation

testGroupChangeOrDeleteScenario1 (  ) 

Create new account, new basic user and new group. Add user to group, allow group to access new account After job is completed record for new account and new user should be in account_read_subscription. Test group deletion

Definition at line 107 of file AccountReadPermissionsSubscriptionUtilTest.php.

testGroupChangeOrDeleteScenario2 (  ) 

Remove user from group, and in this case user and account should still exist in table but with TYPE_DELETE Also in this scenario test when user is added again to the group, after it is removed from group testGroupChangeOrDeleteScenario1

Definition at line 214 of file AccountReadPermissionsSubscriptionUtilTest.php.

testGroupChangeOrDeleteScenario3 (  ) 

Remove permissions from group to access account, and in this case user should be removed from group testGroupChangeOrDeleteScenario2

Definition at line 327 of file AccountReadPermissionsSubscriptionUtilTest.php.

testGroupChangeOrDeleteScenario4 (  ) 

Test nested groups

Definition at line 365 of file AccountReadPermissionsSubscriptionUtilTest.php.

testRoleChangeOrDeleteScenario1 (  ) 

Create new account, new basic user and new role, and add it to user - job should be triggered Test role deletion - job should be triggered

Definition at line 574 of file AccountReadPermissionsSubscriptionUtilTest.php.

testRoleChangeOrDeleteScenario2 (  ) 

Test role nestings 1. role3->role2->role1(role3 is parent of role2 which is parent of role1), $role5->role4 2. create account for user1 3. user2 have role3, user1 have role1, user3 role5 4. user1 get access to account1, user2 should have accesss to it, and it should be in read permission table 5. remove role1 from role2, and test, user2 should lost access to the account 6. change group parent of role1 to be role4, user3 should get access to the account 7. revert role nesting

Definition at line 644 of file AccountReadPermissionsSubscriptionUtilTest.php.

testRoleChangeOrDeleteScenario3 (  ) 

Test parent role deletions 1. r3->r2->r1 2. user2 have role3, user1 have role1 3. create account for user1, user2 should get access to it 4. delete role2, user2 should lost access to account 5. make r3->r1 relationship 6. u2 should get access to the account 7. delete r3, user2 will lost access to the account testRoleChangeOrDeleteScenario2

Definition at line 780 of file AccountReadPermissionsSubscriptionUtilTest.php.

testRoleChangeOrDeleteScenario4 (  ) 

Test when user change role, from one to another to null testRoleChangeOrDeleteScenario2

Definition at line 935 of file AccountReadPermissionsSubscriptionUtilTest.php.

testUserCreationsAndPermissions (  ) 

Test cases when: 1. user is created 2. permissions for user to access account are added 3. permissions for user to access account are removed 4. permissions for user to access account are added after they are being removed

Definition at line 1075 of file AccountReadPermissionsSubscriptionUtilTest.php.

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Mon Jan 20 07:10:46 2020