All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes
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 ()
 
- Public Member Functions inherited from ZurmoBaseTest
 setUp ()
 
- Public Member Functions inherited from BaseTest
 setup ()
 
 teardown ()
 

Static Public Member Functions

static setUpBeforeClass ()
 
static tearDownAfterClass ()
 
- Static Public Member Functions inherited from ZurmoBaseTest
static setUpBeforeClass ()
 
static tearDownAfterClass ()
 
- Static Public Member Functions inherited from BaseTest
static setUpBeforeClass ()
 
static tearDownAfterClass ()
 
static resetAndPopulateFilesArrayByFilePathAndName ($arrayName, $filePath, $fileName)
 
static getDependentTestModelClassNames ()
 
static getReflectedPropertyValue ($object, $propertyName)
 

Protected Member Functions

 deleteAllModelsAndRecordsFromReadPermissionTable ($modelClassName)
 
- Protected Member Functions inherited from ZurmoBaseTest
 endPrintOutputBufferAndFail ()
 
- Protected Member Functions inherited from BaseTest
 assertWithinTolerance ($expected, $actual, $plusMinus)
 
 assertWithinPercentage ($expected, $actual, $percentage)
 
 isDebug ()
 

Static Protected Attributes

static $johnny
 
static $billy
 
static $david
 
- Static Protected Attributes inherited from ZurmoBaseTest
static $activitiesObserver
 
static $conversationsObserver
 
static $emailMessagesObserver
 
static $contactLatestActivityDateTimeObserver
 
static $accountLatestActivityDateTimeObserver
 
static $accountContactAffiliationObserver
 

Additional Inherited Members

- Static Public Attributes inherited from ZurmoBaseTest
static $activateDefaultLanguages = false
 
- Static Public Attributes inherited from BaseTest
static $activateDefaultLanguages = false
 
- Static Protected Member Functions inherited from ZurmoBaseTest
static startOutputBuffer ()
 
static endAndGetOutputBuffer ()
 
- Static Protected Member Functions inherited from BaseTest
static getProtectedMethod ($className, $methodName)
 

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:
Generated on Wed Apr 1 2020 07:10:47