FOSSology  4.6.0
Open Source License Compliance by Open Source Software
Fossology\UI\Api\Test\Controllers\UploadControllerTest Class Reference

Unit tests for UploadController. More...

Inheritance diagram for Fossology\UI\Api\Test\Controllers\UploadControllerTest:
Inheritance graph
Collaboration diagram for Fossology\UI\Api\Test\Controllers\UploadControllerTest:
Collaboration graph

Public Member Functions

 testGetSingleUploadV1 ()
 
 testGetSingleUploadV2 ()
 
 testGetSingleUploadInAccessible ()
 
 testGetUploadWithFiltersV1 ()
 
 testGetUploadWithFiltersV2 ()
 
 testGetUploadsV1 ()
 
 testGetUploadsV2 ()
 
 testGetSingleUploadNotUnpacked ()
 
 testCopyUploadV1 ()
 
 testCopyUploadV2 ()
 
 testMoveUploadInvalidFolderV1 ()
 
 testMoveUploadInvalidFolderV2 ()
 
 testPostUploadV1 ()
 
 testPostUploadV2 ()
 
 testPostUploadNegativeFolderIdV2 ()
 
 testPostUploadFolderNotAccessibleV1 ()
 
 testPostUploadFolderNotAccessibleV2 ()
 
 testPostUploadFolderNotFoundV1 ()
 
 testPostUploadFolderNotFoundV2 ()
 
 testPostUploadInternalErrorV1 ()
 
 testPostUploadInternalErrorV2 ()
 
 testGetUploadLicensesV1 ()
 
 testGetUploadLicensesV2 ()
 
 testGetUploadLicensesPendingScanV1 ()
 
 testGetUploadLicensesPendingScanV2 ()
 
 testUpdateUpload ()
 
 testUpdateUploadNoPerm ()
 
 testGetMainLicenses ()
 
 testSetMainLicense ()
 
 testSetMainLicense_exists ()
 
 testRemoveMainLicense ()
 
 testGetClearingProgressInfo ()
 
 testGetReuseReportSummary ()
 
 testSetGroupsWithPermissions ()
 
 testSetGroupsWithPermissionsNotFound ()
 
 testSetGroupsWithPermissionsUploadNotAccessible ()
 
 testGetAllAgents ()
 
 testGetAllAgentsUploadNotFound ()
 
 testGetAllAgentsUploadNotAccessible ()
 
 testGetEditedLicenses ()
 
 testGetEditedLicensesNotFound ()
 
 testGetEditedLicensesForbidden ()
 
 testGetScannedLicenses ()
 
 testGetScannedLicensesWithNoLicenseFound ()
 
 testGetScannedLicensesNotFound ()
 
 testAgentsRevision ()
 
 testAgentsRevisionNotFound ()
 
 testAgentsRevisionForbidden ()
 
 testGetTopItem ()
 
 testGetTopItemUploadNotFound ()
 
 testGetTopItemInternalServerError ()
 

Static Public Attributes

static $functions
 

Protected Member Functions

 setUp ()
 Setup test objects. More...
 
 tearDown ()
 Remove test objects. More...
 

Private Member Functions

 getResponseJson ($response)
 
 getUploadBounds ($id)
 
 getUpload ($id)
 
 testGetSingleUpload ($version)
 
 testGetUploadWithFilters ($version)
 
 testGetUploads ($version)
 
 testCopyUpload ($version)
 
 testMoveUploadInvalidFolder ($version=ApiVersion::V2)
 
 testPostUpload (int $version)
 
 testPostUploadFolderNotAccessible (int $version)
 
 testPostUploadFolderNotFound (int $version)
 
 testPostUploadInternalError (int $version)
 
 testGetUploadLicenses ($version)
 
 testGetUploadLicensesPendingScan ($version=ApiVersion::V2)
 

Private Attributes

 $assertCountBefore
 
 $userId
 
 $groupId
 
 $dbHelper
 
 $dbManager
 
 $restHelper
 
 $uploadController
 
 $uploadDao
 
 $uploadPermissionDao
 
 $folderDao
 
 $agentDao
 
 $clearingDao
 
 $licenseDao
 
 $reuseReportProcess
 
 $streamFactory
 
 $copyrightPlugin
 
 $downloadPlugin
 

Detailed Description

Unit tests for UploadController.

Definition at line 63 of file UploadControllerTest.php.

Member Function Documentation

◆ getResponseJson()

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

Helper function to get JSON array from response

Parameters
Response$response
Returns
array Decoded response

Definition at line 247 of file UploadControllerTest.php.

◆ getUpload()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::getUpload (   $id)
private

Helper function to generate uploads

Parameters
integer$idUpload id (if > 4, return NULL)
Returns
NULL|Upload

Definition at line 274 of file UploadControllerTest.php.

◆ getUploadBounds()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::getUploadBounds (   $id)
private

Helper function to generate uploads bounds

Parameters
integer$idUpload id (if > 4, return false)
Returns
false|ItemTreeBounds

Definition at line 258 of file UploadControllerTest.php.

◆ setUp()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::setUp ( )
protected

Setup test objects.

See also
PHPUnit_Framework_TestCase::setUp()

Definition at line 175 of file UploadControllerTest.php.

◆ tearDown()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::tearDown ( )
protected

Remove test objects.

See also
PHPUnit_Framework_TestCase::tearDown()

Definition at line 234 of file UploadControllerTest.php.

◆ testAgentsRevision()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testAgentsRevision ( )
Test:
  1. Test UploadController::agentsRevision()
  2. Check if is the statusCode is 200. @runInSeparateProcess @preserveGlobalState disabled

Definition at line 1896 of file UploadControllerTest.php.

◆ testAgentsRevisionForbidden()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testAgentsRevisionForbidden ( )
Test:
  1. Test UploadController::agentsRevision()
  2. Check if HttpForbiddenException is thrown. /

Definition at line 1946 of file UploadControllerTest.php.

◆ testAgentsRevisionNotFound()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testAgentsRevisionNotFound ( )
Test:
  1. Test UploadController::agentsRevision()
  2. Check if HttpNotFoundException is thrown. /

Definition at line 1929 of file UploadControllerTest.php.

◆ testCopyUpload()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testCopyUpload (   $version)
private
Parameters
$versionversion to test
Returns
void
  1. Test the data format returned by Upload::getArray($version) model

Definition at line 636 of file UploadControllerTest.php.

◆ testCopyUploadV1()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testCopyUploadV1 ( )
Test:
  1. Test for UploadController::moveUpload() for a copy action when version is V1
  2. Check if response status is 202

Definition at line 618 of file UploadControllerTest.php.

◆ testCopyUploadV2()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testCopyUploadV2 ( )
Test:
  1. Test for UploadController::moveUpload() for a copy action when version is V2
  2. Check if response status is 202

Definition at line 627 of file UploadControllerTest.php.

◆ testGetAllAgents()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetAllAgents ( )

@runInSeparateProcess @preserveGlobalState disabled

Definition at line 1622 of file UploadControllerTest.php.

◆ testGetAllAgentsUploadNotAccessible()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetAllAgentsUploadNotAccessible ( )
Test:
  1. Test UploadController::getAllAgentsUpload()
  2. Check if the HttpForbiddenException is thrown /

Definition at line 1676 of file UploadControllerTest.php.

◆ testGetAllAgentsUploadNotFound()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetAllAgentsUploadNotFound ( )
Test:
  1. Test UploadController::getAllAgentsUpload()
  2. Check if the HttpNotFoundException is thrown /

Definition at line 1659 of file UploadControllerTest.php.

◆ testGetClearingProgressInfo()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetClearingProgressInfo ( )
Test:
  1. Test for UploadController::getClearingProgressInfo()
  2. Check if response status is 200 and the body matches

Definition at line 1473 of file UploadControllerTest.php.

◆ testGetEditedLicenses()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetEditedLicenses ( )
Test:
  1. Test UploadController::getEditedLicense()
  2. Check if the statusCode is 200. /

Definition at line 1696 of file UploadControllerTest.php.

◆ testGetEditedLicensesForbidden()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetEditedLicensesForbidden ( )
Test:
  1. Test UploadController::getEditedLicense()
  2. Check if HttpForbiddenException is thrown. /

Definition at line 1738 of file UploadControllerTest.php.

◆ testGetEditedLicensesNotFound()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetEditedLicensesNotFound ( )
Test:
  1. Test UploadController::getEditedLicense()
  2. Check if HttpNotFoundException is thrown. /

Definition at line 1719 of file UploadControllerTest.php.

◆ testGetMainLicenses()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetMainLicenses ( )
Test:
  1. Test for UploadController::getMainLicenses()
  2. Check if response status is 200 and RES body matches

Definition at line 1321 of file UploadControllerTest.php.

◆ testGetReuseReportSummary()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetReuseReportSummary ( )
Test:
  1. Test for UploadController::getReuseReportSummary()
  2. Check if response status is 200 & Response body is correct

Definition at line 1512 of file UploadControllerTest.php.

◆ testGetScannedLicenses()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetScannedLicenses ( )
Test:
  1. Test UploadController::getScannedLicenses()
  2. Check if status code is 200 and response contains correct license data. @runInSeparateProcess @preserveGlobalState disabled

Definition at line 1758 of file UploadControllerTest.php.

◆ testGetScannedLicensesNotFound()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetScannedLicensesNotFound ( )
Test:
  1. Test UploadController::getScannedLicense()
  2. Check if HttpNotFoundException is thrown. /

Definition at line 1872 of file UploadControllerTest.php.

◆ testGetScannedLicensesWithNoLicenseFound()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetScannedLicensesWithNoLicenseFound ( )
Test:
  1. Test UploadController::getScannedLicenses()
  2. Verify that uploads with files having no detected license (No_license_found) return 200 without crashing. @runInSeparateProcess @preserveGlobalState disabled

Definition at line 1812 of file UploadControllerTest.php.

◆ testGetSingleUpload()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUpload (   $version)
private
Parameters
$version
Returns
void
Exceptions

Definition at line 330 of file UploadControllerTest.php.

◆ testGetSingleUploadInAccessible()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUploadInAccessible ( )
Test:
  1. Test for UploadController::getUploads() for inaccessible upload
  2. Check if response status is 403

Definition at line 372 of file UploadControllerTest.php.

◆ testGetSingleUploadNotUnpacked()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUploadNotUnpacked ( )
Test:
  1. Test for UploadController::getUploads() where ununpack not finished
  2. Check if the response status is 503
  3. Check if the response has headers Retry-After and Look-at set

Definition at line 594 of file UploadControllerTest.php.

◆ testGetSingleUploadV1()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUploadV1 ( )
Test:
  1. Test for UploadController::getUploads() to fetch single upload when version is V1
  2. Check if response is 200

Definition at line 311 of file UploadControllerTest.php.

◆ testGetSingleUploadV2()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUploadV2 ( )
Test:
  1. Test for UploadController::getUploads() to fetch single upload when version is V2
  2. Check if response is 200

Definition at line 320 of file UploadControllerTest.php.

◆ testGetTopItem()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetTopItem ( )
Test:
  1. Test UploadController::getTopItem()
  2. Check if response status is 404 /

Definition at line 1965 of file UploadControllerTest.php.

◆ testGetTopItemInternalServerError()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetTopItemInternalServerError ( )
Test:
  1. Test UploadController::getTopItem()
  2. Check if response status is 500 /

Definition at line 2012 of file UploadControllerTest.php.

◆ testGetTopItemUploadNotFound()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetTopItemUploadNotFound ( )
Test:
  1. Test UploadController::getTopItem()
  2. Check if response status is 404 /

Definition at line 1990 of file UploadControllerTest.php.

◆ testGetUploadLicensesPendingScan()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesPendingScan (   $version = ApiVersion::V2)
private
Parameters
$versionto test
Returns
void

Definition at line 1198 of file UploadControllerTest.php.

◆ testGetUploadLicensesPendingScanV1()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesPendingScanV1 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::getUploadLicenses() when agents pending with version 1 params
  2. Check if response status is 503
  3. Check if response headers Retry-After and Look-at set

Definition at line 1178 of file UploadControllerTest.php.

◆ testGetUploadLicensesPendingScanV2()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesPendingScanV2 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::getUploadLicenses() when agents pending with version 2 params
  2. Check if response status is 503
  3. Check if response headers Retry-After and Look-at set

Definition at line 1190 of file UploadControllerTest.php.

◆ testGetUploadLicensesV1()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesV1 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::getUploadLicenses() when version is V1
  2. Check if the response status is 200 with correct information

Definition at line 1101 of file UploadControllerTest.php.

◆ testGetUploadLicensesV2()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesV2 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::getUploadLicenses() when version is V2
  2. Check if the response status is 200 with correct information

Definition at line 1112 of file UploadControllerTest.php.

◆ testGetUploadsV1()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadsV1 ( )
Test:
  1. Test UploadController::getUploads() for all uploads when version is V1
  2. Check if the response is array with status 200

Definition at line 543 of file UploadControllerTest.php.

◆ testGetUploadsV2()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadsV2 ( )
Test:
  1. Test UploadController::getUploads() for all uploads when version is V2
  2. Check if the response is array with status 200

Definition at line 551 of file UploadControllerTest.php.

◆ testGetUploadWithFiltersV1()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadWithFiltersV1 ( )
Test:
  1. Test for UploadController::getUploads() with filters when version is V1
  2. Setup various options according to query parameter which will be passed to DbHelper::getUploads()
  3. Make sure all mocks are having once() set to force mockery

Definition at line 396 of file UploadControllerTest.php.

◆ testGetUploadWithFiltersV2()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadWithFiltersV2 ( )
Test:
  1. Test for UploadController::getUploads() with filters when version is V2
  2. Setup various options according to query parameter which will be passed to DbHelper::getUploads()
  3. Make sure all mocks are having once() set to force mockery

Definition at line 407 of file UploadControllerTest.php.

◆ testMoveUploadInvalidFolder()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testMoveUploadInvalidFolder (   $version = ApiVersion::V2)
private
Parameters
$version
Returns
void

Definition at line 700 of file UploadControllerTest.php.

◆ testMoveUploadInvalidFolderV1()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testMoveUploadInvalidFolderV1 ( )

getUploadSummary, getLicensesHistogram, setUploadPermissions, getUploadCopyrights,deleteUpload

Test:
  1. Test for UploadController::moveUpload() with invalid folder id with version 1
  2. Check if response status is 400

Definition at line 683 of file UploadControllerTest.php.

◆ testMoveUploadInvalidFolderV2()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testMoveUploadInvalidFolderV2 ( )
Test:
  1. Test for UploadController::moveUpload() with invalid folder id with version 2
  2. Check if response status is 400

Definition at line 692 of file UploadControllerTest.php.

◆ testPostUpload()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUpload ( int  $version)
private
Parameters
int$versionVersion to test
Returns
void

Definition at line 751 of file UploadControllerTest.php.

◆ testPostUploadFolderNotAccessible()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotAccessible ( int  $version)
private
Parameters
int$versionVersion to test
Returns
void

Definition at line 891 of file UploadControllerTest.php.

◆ testPostUploadFolderNotAccessibleV1()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotAccessibleV1 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::postUpload() with inaccessible folder with V1 parameters
  2. Check if response status is 403

Definition at line 870 of file UploadControllerTest.php.

◆ testPostUploadFolderNotAccessibleV2()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotAccessibleV2 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::postUpload() with inaccessible folder with V2 parameters
  2. Check if response status is 403

Definition at line 882 of file UploadControllerTest.php.

◆ testPostUploadFolderNotFound()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotFound ( int  $version)
private
Parameters
int$versionVersion to test
Returns
void

Definition at line 964 of file UploadControllerTest.php.

◆ testPostUploadFolderNotFoundV1()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotFoundV1 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::postUpload() with invalid folder id with V1 parameters
  2. Check if response status is 404

Definition at line 943 of file UploadControllerTest.php.

◆ testPostUploadFolderNotFoundV2()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotFoundV2 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::postUpload() with invalid folder id with V2 parameters
  2. Check if response status is 404

Definition at line 955 of file UploadControllerTest.php.

◆ testPostUploadInternalError()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadInternalError ( int  $version)
private
Parameters
int$versionVersion to test
Returns
void

Definition at line 1035 of file UploadControllerTest.php.

◆ testPostUploadInternalErrorV1()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadInternalErrorV1 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::postUpload() with internal error with V1 parameters
  2. Check if response status is 500 with error messages set

Definition at line 1014 of file UploadControllerTest.php.

◆ testPostUploadInternalErrorV2()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadInternalErrorV2 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::postUpload() with internal error with V2 parameters
  2. Check if response status is 500 with error messages set

Definition at line 1026 of file UploadControllerTest.php.

◆ testPostUploadNegativeFolderIdV2()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadNegativeFolderIdV2 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::postUpload() with negative folderId (V2)
  2. Negative folderId is invalid input and should return 400

Definition at line 828 of file UploadControllerTest.php.

◆ testPostUploadV1()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadV1 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::postUpload() with V1 parameters
  2. Check if response status is 201 with upload id

Definition at line 730 of file UploadControllerTest.php.

◆ testPostUploadV2()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadV2 ( )

@runInSeparateProcess @preserveGlobalState disabled

Test:
  1. Test for UploadController::postUpload() with V2 parameters
  2. Check if response status is 201 with upload id

Definition at line 742 of file UploadControllerTest.php.

◆ testRemoveMainLicense()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testRemoveMainLicense ( )
Test:
  1. Test for UploadController::removeMainLicense()
  2. Check if response status is 200 and the body matches

Definition at line 1436 of file UploadControllerTest.php.

◆ testSetGroupsWithPermissions()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testSetGroupsWithPermissions ( )
Test:
  1. Test UploadController::setGroupsWithPermissions()
  2. Check if the statusCode is 200 /

Definition at line 1547 of file UploadControllerTest.php.

◆ testSetGroupsWithPermissionsNotFound()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testSetGroupsWithPermissionsNotFound ( )
Test:
  1. Test UploadController::setGroupsWithPermissions()
  2. Check if the HttpNotFoundException is thrown /

Definition at line 1580 of file UploadControllerTest.php.

◆ testSetGroupsWithPermissionsUploadNotAccessible()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testSetGroupsWithPermissionsUploadNotAccessible ( )
Test:
  1. Test UploadController::setGroupsWithPermissions()
  2. Check if the HttpForbiddenException is thrown /

Definition at line 1603 of file UploadControllerTest.php.

◆ testSetMainLicense()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testSetMainLicense ( )
Test:
  1. Test for UploadController::setMainLicense()
  2. Check if response status is 200 and Res body matches

Definition at line 1352 of file UploadControllerTest.php.

◆ testSetMainLicense_exists()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testSetMainLicense_exists ( )
Test:
  1. Test for UploadController::setMainLicense()
  2. Check if response status is 400, when the license already Exists and Res body matches

Definition at line 1397 of file UploadControllerTest.php.

◆ testUpdateUpload()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testUpdateUpload ( )
Test:
  1. Test for UploadController::updateUpload()
  2. Check if response status is 202

Definition at line 1247 of file UploadControllerTest.php.

◆ testUpdateUploadNoPerm()

Fossology\UI\Api\Test\Controllers\UploadControllerTest::testUpdateUploadNoPerm ( )
Test:
  1. Test for UploadController::updateUpload() without permission
  2. Check if response status is 403

Definition at line 1293 of file UploadControllerTest.php.

Member Data Documentation

◆ $agentDao

AgentDao Fossology\UI\Api\Test\Controllers\UploadControllerTest::$agentDao
private

AgentDao mock

Definition at line 135 of file UploadControllerTest.php.

◆ $assertCountBefore

integer Fossology\UI\Api\Test\Controllers\UploadControllerTest::$assertCountBefore
private

Assertions before running tests

Definition at line 75 of file UploadControllerTest.php.

◆ $clearingDao

ClearingDao Fossology\UI\Api\Test\Controllers\UploadControllerTest::$clearingDao
private

ClearingDao mock

Definition at line 141 of file UploadControllerTest.php.

◆ $dbHelper

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

DbHelper mock

Definition at line 93 of file UploadControllerTest.php.

◆ $dbManager

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

Dbmanager mock

Definition at line 99 of file UploadControllerTest.php.

◆ $folderDao

FolderDao Fossology\UI\Api\Test\Controllers\UploadControllerTest::$folderDao
private

FolderDao mock

Definition at line 129 of file UploadControllerTest.php.

◆ $functions

Mockery MockInterface Fossology\UI\Api\Test\Controllers\UploadControllerTest::$functions
static

Public function mock

Definition at line 69 of file UploadControllerTest.php.

◆ $groupId

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

Group ID to mock

Definition at line 87 of file UploadControllerTest.php.

◆ $licenseDao

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

LicenseDao mock

Definition at line 147 of file UploadControllerTest.php.

◆ $restHelper

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

RestHelper mock

Definition at line 105 of file UploadControllerTest.php.

◆ $reuseReportProcess

ReuseReportProcessor Fossology\UI\Api\Test\Controllers\UploadControllerTest::$reuseReportProcess
private

ReuseReportProcessor mock

Definition at line 153 of file UploadControllerTest.php.

◆ $streamFactory

StreamFactory Fossology\UI\Api\Test\Controllers\UploadControllerTest::$streamFactory
private

Stream factory to create body streams.

Definition at line 159 of file UploadControllerTest.php.

◆ $uploadController

UploadController Fossology\UI\Api\Test\Controllers\UploadControllerTest::$uploadController
private

UploadController mock

Definition at line 111 of file UploadControllerTest.php.

◆ $uploadDao

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

UploadDao mock

Definition at line 117 of file UploadControllerTest.php.

◆ $uploadPermissionDao

UploadPermissionDao Fossology\UI\Api\Test\Controllers\UploadControllerTest::$uploadPermissionDao
private

UploadPermissionDao mock

Definition at line 123 of file UploadControllerTest.php.

◆ $userId

integer Fossology\UI\Api\Test\Controllers\UploadControllerTest::$userId
private

User ID to mock

Definition at line 81 of file UploadControllerTest.php.


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