FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Lib\Dao\UploadPermissionDaoTest Class Reference
Inheritance diagram for Fossology\Lib\Dao\UploadPermissionDaoTest:
Inheritance graph
Collaboration diagram for Fossology\Lib\Dao\UploadPermissionDaoTest:
Collaboration graph

Public Member Functions

 testmakeAccessibleToGroup ()
 
 testDeletePermissionId ()
 
 testUpdatePermissionId ()
 
 testInsertPermission ()
 
 testGetPublicPermission ()
 
 testGetPermissionGroups ()
 
 testAccessibilityViaNone ()
 
 testAccessibilityViaGroup ()
 
 testAccessibilityViaPublicForUnqualifiedUser ()
 
 testAccessibilityViaPublicForQualifiedUser ()
 
 testIsEditable ()
 
 testIsAccessibleTrue ()
 
 testIsAccessibleFalse ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Private Attributes

 $testDb
 
 $dbManager
 
 $uploadPermissionDao
 

Detailed Description

Definition at line 17 of file UploadPermissionDaoTest.php.

Member Function Documentation

◆ testIsAccessibleFalse()

Fossology\Lib\Dao\UploadPermissionDaoTest::testIsAccessibleFalse ( )
Test:
  1. Test to verify access permissions for an upload using UploadPermissionDao::isAccessible().
  2. Insert a permission with no access (PERM_NONE) for a user (user ID: 2).
  3. Ensure that the isAccessible() method correctly returns false when no permission is granted.

Definition at line 213 of file UploadPermissionDaoTest.php.

◆ testIsAccessibleTrue()

Fossology\Lib\Dao\UploadPermissionDaoTest::testIsAccessibleTrue ( )
Test:
  1. Test to verify that access is granted when the correct permission is set using UploadPermissionDao::isAccessible().
  2. Insert a write permission (PERM_WRITE) for a user (user ID: 2) and upload (upload ID: 3).
  3. Ensure that the isAccessible() method returns true when the user has write access.

Definition at line 197 of file UploadPermissionDaoTest.php.

◆ testIsEditable()

Fossology\Lib\Dao\UploadPermissionDaoTest::testIsEditable ( )
Test:
  1. Test to check if a user can edit an upload UploadPermissionDao::isEditable()
  2. Set the user's permission level to PERM_WRITE
  3. Check if the user has the correct permission to edit the upload

Definition at line 181 of file UploadPermissionDaoTest.php.


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