FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest Class Reference
Inheritance diagram for Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest:
Inheritance graph
Collaboration diagram for Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest:
Collaboration graph

Public Member Functions

 testViewLicenseFile ()
 
 testSetClearingDecisionReturnsOk ()
 
 testSetClearingDecisionReturnsError ()
 
 testGetNextPreviousItem ()
 
 testGetNextPreviousItem_isSelectionValid ()
 
 testGetBulkHistory ()
 
 testGetClearingHistory ()
 
 testGetHighlightEntries ()
 
 testGetTreeViewUploadNotFound ()
 
 testGetTreeViewAgentNotFound ()
 
 testGetTreeViewTagNotFound ()
 
 testGetTreeViewUploadNotAccessible ()
 
 testGetLicenseDecisions ()
 
 testHandleAddEditAndDeleteLicenseDecision_Add ()
 
 testHandleAddEditAndDeleteLicenseDecision_Edit ()
 
 testHandleAddEditAndDeleteLicenseDecision_Delete ()
 
 testScheduleBulkScan ()
 

Protected Member Functions

 setUp ()
 

Private Member Functions

 getResponseJson ($response)
 

Private Attributes

 $dbHelper
 
 $dbManager
 
 $restHelper
 
 $uploadTreeController
 
 $uploadDao
 
 $licenseDao
 
 $concludeLicensePlugin
 
 $highlightDao
 
 $clearingEventTypes
 
 $streamFactory
 
 $decisionScopes
 
 $changeLicenseBulk
 
 $viewFilePlugin
 
 $viewLicensePlugin
 
 $decisionTypes
 
 $itemTreeBoundsMock
 
 $clearingDecisionEventProcessor
 
 $groupId
 Setup test objects. More...
 
 $uploadId
 
 $agentId
 
 $tagId
 

Detailed Description

Definition at line 73 of file UploadTreeControllerTest.php.

Member Function Documentation

◆ getResponseJson()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::getResponseJson (   $response)
private

Helper function to get JSON array from response

Parameters
Response$response
Returns
array Decoded response

Definition at line 267 of file UploadTreeControllerTest.php.

◆ testGetBulkHistory()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetBulkHistory ( )
Test:
  1. Test for UploadTreeController::getClearingHistory()
  2. Check if response status is 200 and RES body matches

Definition at line 484 of file UploadTreeControllerTest.php.

◆ testGetClearingHistory()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetClearingHistory ( )
Test:
  1. Test for UploadTreeController::getClearingHistory()
  2. Check if response status is 200 and RES body matches

Definition at line 528 of file UploadTreeControllerTest.php.

◆ testGetHighlightEntries()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetHighlightEntries ( )
Test:
  1. Test for UploadController::viewLicenseFile() with valid status
  2. Check if response status is 200 and the body has the expected contents

Definition at line 573 of file UploadTreeControllerTest.php.

◆ testGetLicenseDecisions()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetLicenseDecisions ( )
Test:
  1. Test for UploadTreeController::getLicenseDecisions()
  2. Check if response status is 200 and RES body matches
Exceptions

Definition at line 761 of file UploadTreeControllerTest.php.

◆ testGetNextPreviousItem()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetNextPreviousItem ( )
Test:
  1. Test for UploadTreeController::getNextPreviousItem()
  2. Check if response status is 200 and RES body matches

Definition at line 396 of file UploadTreeControllerTest.php.

◆ testGetNextPreviousItem_isSelectionValid()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetNextPreviousItem_isSelectionValid ( )
Test:
  1. Test for UploadTreeController::getNextPreviousItem()
  2. Check if response status 400 & response body matches

Definition at line 442 of file UploadTreeControllerTest.php.

◆ testGetTreeViewAgentNotFound()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetTreeViewAgentNotFound ( )
Test:
  • # Test UploadTreeController::getTreeView
  • # Check if HttpNotFound Exception is thrown for unavailable agent.
Returns
void
Exceptions

Definition at line 654 of file UploadTreeControllerTest.php.

◆ testGetTreeViewTagNotFound()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetTreeViewTagNotFound ( )
Test:
  • # Test UploadTreeController::getTreeView
  • # Check if HttpNotFound Exception is thrown for unavailable tag.
Returns
void
Exceptions

Definition at line 691 of file UploadTreeControllerTest.php.

◆ testGetTreeViewUploadNotAccessible()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetTreeViewUploadNotAccessible ( )
Test:
  • # Test UploadTreeController::getTreeView
  • # Check if HttpForbiden exception is thrown for unaccessible upload
Returns
void
Exceptions

Definition at line 728 of file UploadTreeControllerTest.php.

◆ testGetTreeViewUploadNotFound()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testGetTreeViewUploadNotFound ( )
Test:
  1. Test for UploadTreeController::getTreeView()
  2. Check if the HttpNotFoundException is thrown
Returns
void
Exceptions

Definition at line 620 of file UploadTreeControllerTest.php.

◆ testHandleAddEditAndDeleteLicenseDecision_Add()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testHandleAddEditAndDeleteLicenseDecision_Add ( )
Test:
  1. Test for UploadTreeController::handleAddEditAndDeleteLicenseDecision() for adding, editing, and deleting license decision
  2. Check if response status is 200 and response body matches

Definition at line 821 of file UploadTreeControllerTest.php.

◆ testHandleAddEditAndDeleteLicenseDecision_Delete()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testHandleAddEditAndDeleteLicenseDecision_Delete ( )
Test:
  1. Test for UploadTreeController::handleAddEditAndDeleteLicenseDecision() for adding, editing, and deleting license decision
  2. Check if response status is 200 and response body matches

Definition at line 938 of file UploadTreeControllerTest.php.

◆ testHandleAddEditAndDeleteLicenseDecision_Edit()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testHandleAddEditAndDeleteLicenseDecision_Edit ( )
Test:
  1. Test for UploadTreeController::handleAddEditAndDeleteLicenseDecision() for adding, editing, and deleting license decision
  2. Check if response status is 200 and response body matches

Definition at line 879 of file UploadTreeControllerTest.php.

◆ testScheduleBulkScan()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testScheduleBulkScan ( )
Test:
  1. Test for UploadTreeController::getNextPreviousItem()
  2. Check if response status is 200 and RES body matches

Definition at line 997 of file UploadTreeControllerTest.php.

◆ testSetClearingDecisionReturnsError()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testSetClearingDecisionReturnsError ( )
Test:
  1. Test for UploadTreeController::setClearingDecision() for setting a clearing decision
  2. Check if response status is 400, if the given decisionType is invalid

Definition at line 355 of file UploadTreeControllerTest.php.

◆ testSetClearingDecisionReturnsOk()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testSetClearingDecisionReturnsOk ( )
Test:
  1. Test for UploadTreeController::setClearingDecision() for setting a clearing decision
  2. Check if response status is 200 and response body matches

Definition at line 307 of file UploadTreeControllerTest.php.

◆ testViewLicenseFile()

Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::testViewLicenseFile ( )
Test:
  1. Test for UploadController::viewLicenseFile() with valid status
  2. Check if response status is 200 and the body has the expected contents

Definition at line 278 of file UploadTreeControllerTest.php.

Member Data Documentation

◆ $changeLicenseBulk

ChangeLicenseBulk Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$changeLicenseBulk
private

ChangeLicenseBulk mock

Definition at line 145 of file UploadTreeControllerTest.php.

◆ $clearingDecisionEventProcessor

ClearingDecisionProcessor Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$clearingDecisionEventProcessor
private

ClearingDecisionProcessor Mock

Definition at line 174 of file UploadTreeControllerTest.php.

◆ $clearingEventTypes

ClearingEventTypes Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$clearingEventTypes
private

ClearingDao mock

Definition at line 127 of file UploadTreeControllerTest.php.

◆ $concludeLicensePlugin

AjaxClearingView Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$concludeLicensePlugin
private

AjaxClearingView mock

Definition at line 115 of file UploadTreeControllerTest.php.

◆ $dbHelper

DbHelper Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$dbHelper
private

DbHelper mock

Definition at line 79 of file UploadTreeControllerTest.php.

◆ $dbManager

DbManager Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$dbManager
private

Dbmanager mock

Definition at line 85 of file UploadTreeControllerTest.php.

◆ $decisionScopes

DecisionScopes Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$decisionScopes
private

Decision types object

Definition at line 139 of file UploadTreeControllerTest.php.

◆ $decisionTypes

DecisionTypes Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$decisionTypes
private

Decision types object

Definition at line 163 of file UploadTreeControllerTest.php.

◆ $groupId

integer Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$groupId
private

Setup test objects.

See also
PHPUnit_Framework_TestCase::setUp()

Group ID to mock

Definition at line 185 of file UploadTreeControllerTest.php.

◆ $highlightDao

HighlightDao Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$highlightDao
private

ClearingDao mock

Definition at line 121 of file UploadTreeControllerTest.php.

◆ $itemTreeBoundsMock

ItemTreeBounds Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$itemTreeBoundsMock
private

ItemTreeBounds Mock

Definition at line 169 of file UploadTreeControllerTest.php.

◆ $licenseDao

LicenseDao Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$licenseDao
private

LicenseDao mock

Definition at line 109 of file UploadTreeControllerTest.php.

◆ $restHelper

RestHelper Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$restHelper
private

RestHelper mock

Definition at line 91 of file UploadTreeControllerTest.php.

◆ $uploadDao

UploadDao Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$uploadDao
private

UploadDao mock

Definition at line 103 of file UploadTreeControllerTest.php.

◆ $uploadTreeController

UploadTreeController Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$uploadTreeController
private

UploadTreeController mock

Definition at line 97 of file UploadTreeControllerTest.php.

◆ $viewFilePlugin

M MockInterface Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$viewFilePlugin
private

ViewFilePlugin mock

Definition at line 151 of file UploadTreeControllerTest.php.

◆ $viewLicensePlugin

M MockInterface Fossology\UI\Api\Test\Controllers\UploadTreeControllerTest::$viewLicensePlugin
private

ViewFilePlugin mock

Definition at line 157 of file UploadTreeControllerTest.php.


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