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

Public Member Functions

 testGetNextItemWithEmptyArchive ()
 
 testGetPreviousItemWithEmptyArchive ()
 
 testGetNextItemWithSingleFile ()
 
 testGetPreviousItemWithSingleFile ()
 
 testGetNextItemWithNestedFile ()
 
 testGetPreviousItemWithNestedFile ()
 
 testGetNextItemWithFileAfterEmptyDirectory ()
 
 testGetPreviousItemWithFileAfterEmptyDirectory ()
 
 testGetNextItemWithMultipleFiles ()
 
 testGetPreviousItemWithMultipleFiles ()
 
 testGetNextItemUsesRecursiveAndRegularSearchAsFallback ()
 
 testGetPrevItemUsesRecursiveAndRegularSearchAsFallback ()
 
 testGetNextItemUsesRecursiveOnly ()
 
 testGetPrevItemUsesRecursiveOnly ()
 
 testGetNextFull ()
 
 testGetPreviousFull ()
 
 testCountNonArtifactDescendants ()
 
 testGetUploadParent ()
 
 testGetUploadParentFromBrokenTree ()
 
 testGetUploadParentFromNonExistingTree ()
 
 testGetUploadHashes ()
 
 testGetFatItem ()
 
 testGetAssigneeDate ()
 
 testGetClosedDate ()
 
 testGetCyclonedxSettingsFallsBackToOwnerDefaults ()
 
 testGetCyclonedxSettingsPrefersStoredSettings ()
 
 testNewReportInfoRowIsSeededFromOwnerDefaults ()
 
 testUpdateReportInfoMergesCyclonedxSettings ()
 
 testUpdateReportInfoRejectsInvalidCyclonedxSettings ($value)
 

Static Public Member Functions

static provideInvalidCyclonedxUpdates ()
 

Public Attributes

 $assertCountBefore
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 
 prepareUploadTree ($uploadTreeArray=array())
 
 prepareModularTable ($subentries=array())
 
 getSubentriesForSingleFile ()
 
 getSubentriesForNestedFile ()
 
 getSubentriesForFileAfterEmptyDirectory ()
 
 getSubentriesForMultipleFiles ()
 
 getTestFileStructure ()
 

Private Member Functions

 setUploadOwnerCyclonedxDefaults ($userSettings)
 

Private Attributes

 $testDb
 
 $dbManager
 
 $uploadDao
 
 $entries
 

Detailed Description

Definition at line 21 of file UploadDaoTest.php.

Member Function Documentation

◆ getSubentriesForFileAfterEmptyDirectory()

Fossology\Lib\Dao\UploadDaoTest::getSubentriesForFileAfterEmptyDirectory ( )
protected
Returns
array

docs <-dir docs/txt <-dir README <-file

Definition at line 221 of file UploadDaoTest.php.

◆ getSubentriesForMultipleFiles()

Fossology\Lib\Dao\UploadDaoTest::getSubentriesForMultipleFiles ( )
protected
Returns
array

Definition at line 239 of file UploadDaoTest.php.

◆ getSubentriesForNestedFile()

Fossology\Lib\Dao\UploadDaoTest::getSubentriesForNestedFile ( )
protected
Returns
array

Definition at line 209 of file UploadDaoTest.php.

◆ getSubentriesForSingleFile()

Fossology\Lib\Dao\UploadDaoTest::getSubentriesForSingleFile ( )
protected
Returns
array

Definition at line 201 of file UploadDaoTest.php.

◆ prepareModularTable()

Fossology\Lib\Dao\UploadDaoTest::prepareModularTable (   $subentries = array())
protected
Parameters
$subentries

Definition at line 183 of file UploadDaoTest.php.

◆ prepareUploadTree()

Fossology\Lib\Dao\UploadDaoTest::prepareUploadTree (   $uploadTreeArray = array())
protected
Parameters
array$uploadTreeArray
Exceptions

Definition at line 170 of file UploadDaoTest.php.

◆ setUploadOwnerCyclonedxDefaults()

Fossology\Lib\Dao\UploadDaoTest::setUploadOwnerCyclonedxDefaults (   $userSettings)
private

Make user 7 the owner of upload 2 with the given CycloneDX defaults.

Parameters
string$userSettingsValue of users.cyclonedx_settings

Definition at line 540 of file UploadDaoTest.php.

◆ testGetAssigneeDate()

Fossology\Lib\Dao\UploadDaoTest::testGetAssigneeDate ( )
Test:

Test if getAssigneeDate() is giving assigning date, not closing date.

  1. Create an upload event with type ASSIGN_EVENT and one timestamp.
  2. Create another upload event with different type and different timestamp.
  3. Test if timestamp matches.
  4. Test if event does not exist, return value is null.

Definition at line 487 of file UploadDaoTest.php.

◆ testGetClosedDate()

Fossology\Lib\Dao\UploadDaoTest::testGetClosedDate ( )
Test:

Test if getClosedDate() is giving close date, not other date.

  1. Create an upload event with type UPLOAD_CLOSED_EVENT and one timestamp.
  2. Create another upload event with different type and different timestamp.
  3. Test if timestamp matches.
  4. Test if event does not exist, return value is null.

Definition at line 516 of file UploadDaoTest.php.

◆ testUpdateReportInfoRejectsInvalidCyclonedxSettings()

Fossology\Lib\Dao\UploadDaoTest::testUpdateReportInfoRejectsInvalidCyclonedxSettings (   $value)

@dataProvider provideInvalidCyclonedxUpdates

Definition at line 608 of file UploadDaoTest.php.

Member Data Documentation

◆ $entries

Fossology\Lib\Dao\UploadDaoTest::$entries
private
Initial value:
= array(
3653, 3668, 3683, 3685, 3671, 3665, 3676, 3675, 3681, 3677, 3673, 3658, 3660, 3686,
)

Filestructure ( NoLic files are removed) NR uploadtree_pk A 1 3653 B_NoLic C 2 3668 D D/E 3 3683 D/F_NoLic D/G 4 3685 H H/I_NoLic H/J 5 3671 H/K_NoLic L L/L1 L/L1/L1a_NoLic L/L2 L/L2/L2a 6 3665 L/L3 L/L3/L3a_NoLic M M/M1 N N/N1 7 3676 N/N2 N/N2/N2a_NoLic N/N3 8 3675 N/N4 N/N4/N4a 9 3681 N/N5 10 3677 O 11 3673 P P/P1_NoLic P/P2 P/P2/P2a 12 3658 P/P3 13 3660 R 14 3686

Definition at line 290 of file UploadDaoTest.php.


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