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

Public Member Functions

 tearDown ()
 
 testRelevantClearingEvents ()
 
 testWip ()
 
 testBulkHistoryWithoutMatches ()
 
 testBulkHistoryWithoutMatchesFromDifferentFolder ()
 
 testBulkHistoryWithAMatch ()
 
 testBulkHistoryWithAMatchReturningAlsoNotTried ()
 
 testKotobaHistoryGroupsAddedAndRemovedLicensesOfSamePhrase ()
 
 testKotobaHistoryDistinguishesMatchedFromTriedOnly ()
 
 testKotobaHistoryEmptyWhenNoDecisionsRecordedYet ()
 
 testGetClearedLicenseMultiplicities ()
 
 testGetClearedLicenses ()
 
 testMainLicenseIds ()
 
 testupdateClearingEvent ()
 

Protected Member Functions

 setUp ()
 

Private Member Functions

 insertBulkEvents ()
 
 insertKotobaEvents ()
 
 buildProposals ($licProp, $i=0)
 
 buildDecisions ($cDec, $j=0)
 
 getMyDate ($ts)
 
 collectBulkLicenses ($bulks)
 

Private Attributes

 $testDb
 
 $dbManager
 
 $uploadDao
 
 $clearingDao
 
 $now
 
 $items
 
 $groupId = 601
 

Detailed Description

Definition at line 24 of file ClearingDaoTest.php.

Member Function Documentation

◆ insertKotobaEvents()

Fossology\Lib\Dao\ClearingDaoTest::insertKotobaEvents ( )
private

Simulate kotoba.c: one clearing_event row per license mapping of a matched phrase, but highlight_kotoba only gets a row for the first mapping (k==0) of each phrase match, not every sibling row.

Definition at line 188 of file ClearingDaoTest.php.

◆ testKotobaHistoryDistinguishesMatchedFromTriedOnly()

Fossology\Lib\Dao\ClearingDaoTest::testKotobaHistoryDistinguishesMatchedFromTriedOnly ( )
Test:
matched = decided exactly on the current item; tried = decided somewhere within the current item's subtree. Verifies this distinction still holds after grouping by cp_fk instead of reportinfo.

Definition at line 447 of file ClearingDaoTest.php.

◆ testKotobaHistoryEmptyWhenNoDecisionsRecordedYet()

Fossology\Lib\Dao\ClearingDaoTest::testKotobaHistoryEmptyWhenNoDecisionsRecordedYet ( )
Test:
Custom phrases are global (not scoped to an upload at creation, unlike a bulk run's own uploadtree_fk), so unlike getBulkHistory() there is no "candidate list" to fall back on before anything has ever been scanned and decided. No clearing_event/highlight_kotoba rows yet must mean an empty result, not an error.

Definition at line 484 of file ClearingDaoTest.php.

◆ testKotobaHistoryGroupsAddedAndRemovedLicensesOfSamePhrase()

Fossology\Lib\Dao\ClearingDaoTest::testKotobaHistoryGroupsAddedAndRemovedLicensesOfSamePhrase ( )
Test:
Regression: reportinfo is now per-license-mapping metadata, so it is empty for a "remove" mapping with no custom text. getKotobaHistory() used to group by reportinfo and filter out empty values, silently dropping every such remove mapping. It must group by cp_fk instead, so an add and a remove mapping of the same phrase show up together.

Definition at line 420 of file ClearingDaoTest.php.


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