Unit tests for UploadController.
More...
Unit tests for UploadController.
Definition at line 61 of file UploadControllerTest.php.
◆ getResponseJson()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::getResponseJson |
( |
|
$response | ) |
|
|
private |
◆ getUpload()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::getUpload |
( |
|
$id | ) |
|
|
private |
◆ getUploadBounds()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::getUploadBounds |
( |
|
$id | ) |
|
|
private |
Helper function to generate uploads bounds
- Parameters
-
integer | $id | Upload id (if > 4, return false) |
- Returns
- false|ItemTreeBounds
Definition at line 256 of file UploadControllerTest.php.
◆ setUp()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::setUp |
( |
| ) |
|
|
protected |
◆ tearDown()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::tearDown |
( |
| ) |
|
|
protected |
◆ testAgentsRevision()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testAgentsRevision |
( |
| ) |
|
- Test:
- Test UploadController::agentsRevision()
- Check if is the statusCode is 200. @runInSeparateProcess @preserveGlobalState disabled
Definition at line 1724 of file UploadControllerTest.php.
◆ testAgentsRevisionForbidden()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testAgentsRevisionForbidden |
( |
| ) |
|
◆ testAgentsRevisionNotFound()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testAgentsRevisionNotFound |
( |
| ) |
|
◆ testCopyUpload()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testCopyUpload |
( |
|
$version | ) |
|
|
private |
- Parameters
-
- Returns
- void
- Test the data format returned by Upload::getArray($version) model
Definition at line 634 of file UploadControllerTest.php.
◆ testCopyUploadV1()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testCopyUploadV1 |
( |
| ) |
|
◆ testCopyUploadV2()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testCopyUploadV2 |
( |
| ) |
|
◆ testGetAllAgents()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetAllAgents |
( |
| ) |
|
◆ testGetAllAgentsUploadNotAccessible()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetAllAgentsUploadNotAccessible |
( |
| ) |
|
◆ testGetAllAgentsUploadNotFound()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetAllAgentsUploadNotFound |
( |
| ) |
|
◆ testGetClearingProgressInfo()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetClearingProgressInfo |
( |
| ) |
|
◆ testGetEditedLicenses()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetEditedLicenses |
( |
| ) |
|
◆ testGetEditedLicensesForbidden()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetEditedLicensesForbidden |
( |
| ) |
|
◆ testGetEditedLicensesNotFound()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetEditedLicensesNotFound |
( |
| ) |
|
◆ testGetMainLicenses()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetMainLicenses |
( |
| ) |
|
◆ testGetReuseReportSummary()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetReuseReportSummary |
( |
| ) |
|
- Test:
- Test for UploadController::getReuseReportSummary()
- Check if response status is 200 & Response body is correct
Definition at line 1455 of file UploadControllerTest.php.
◆ testGetScannedLicensesNotFound()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetScannedLicensesNotFound |
( |
| ) |
|
◆ testGetSingleUpload()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUpload |
( |
|
$version | ) |
|
|
private |
◆ testGetSingleUploadInAccessible()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUploadInAccessible |
( |
| ) |
|
◆ testGetSingleUploadNotUnpacked()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUploadNotUnpacked |
( |
| ) |
|
◆ testGetSingleUploadV1()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUploadV1 |
( |
| ) |
|
◆ testGetSingleUploadV2()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetSingleUploadV2 |
( |
| ) |
|
◆ testGetTopItem()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetTopItem |
( |
| ) |
|
◆ testGetTopItemInternalServerError()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetTopItemInternalServerError |
( |
| ) |
|
◆ testGetTopItemUploadNotFound()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetTopItemUploadNotFound |
( |
| ) |
|
◆ testGetUploadLicensesPendingScan()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesPendingScan |
( |
|
$version = ApiVersion::V2 | ) |
|
|
private |
◆ testGetUploadLicensesPendingScanV1()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesPendingScanV1 |
( |
| ) |
|
◆ testGetUploadLicensesPendingScanV2()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesPendingScanV2 |
( |
| ) |
|
◆ testGetUploadLicensesV1()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesV1 |
( |
| ) |
|
◆ testGetUploadLicensesV2()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadLicensesV2 |
( |
| ) |
|
◆ testGetUploadsV1()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadsV1 |
( |
| ) |
|
◆ testGetUploadsV2()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadsV2 |
( |
| ) |
|
◆ testGetUploadWithFiltersV1()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadWithFiltersV1 |
( |
| ) |
|
◆ testGetUploadWithFiltersV2()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testGetUploadWithFiltersV2 |
( |
| ) |
|
◆ testMoveUploadInvalidFolder()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testMoveUploadInvalidFolder |
( |
|
$version = ApiVersion::V2 | ) |
|
|
private |
◆ testMoveUploadInvalidFolderV1()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testMoveUploadInvalidFolderV1 |
( |
| ) |
|
◆ testMoveUploadInvalidFolderV2()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testMoveUploadInvalidFolderV2 |
( |
| ) |
|
◆ testPostUpload()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUpload |
( |
int |
$version | ) |
|
|
private |
◆ testPostUploadFolderNotAccessible()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotAccessible |
( |
int |
$version | ) |
|
|
private |
◆ testPostUploadFolderNotAccessibleV1()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotAccessibleV1 |
( |
| ) |
|
@runInSeparateProcess @preserveGlobalState disabled
- Test:
- Test for UploadController::postUpload() with inaccessible folder with V1 parameters
- Check if response status is 403
Definition at line 820 of file UploadControllerTest.php.
◆ testPostUploadFolderNotAccessibleV2()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotAccessibleV2 |
( |
| ) |
|
@runInSeparateProcess @preserveGlobalState disabled
- Test:
- Test for UploadController::postUpload() with inaccessible folder with V2 parameters
- Check if response status is 403
Definition at line 832 of file UploadControllerTest.php.
◆ testPostUploadFolderNotFound()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotFound |
( |
int |
$version | ) |
|
|
private |
◆ testPostUploadFolderNotFoundV1()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotFoundV1 |
( |
| ) |
|
@runInSeparateProcess @preserveGlobalState disabled
- Test:
- Test for UploadController::postUpload() with invalid folder id with V1 parameters
- Check if response status is 404
Definition at line 893 of file UploadControllerTest.php.
◆ testPostUploadFolderNotFoundV2()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadFolderNotFoundV2 |
( |
| ) |
|
@runInSeparateProcess @preserveGlobalState disabled
- Test:
- Test for UploadController::postUpload() with invalid folder id with V2 parameters
- Check if response status is 404
Definition at line 905 of file UploadControllerTest.php.
◆ testPostUploadInternalError()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadInternalError |
( |
int |
$version | ) |
|
|
private |
◆ testPostUploadInternalErrorV1()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadInternalErrorV1 |
( |
| ) |
|
@runInSeparateProcess @preserveGlobalState disabled
- Test:
- Test for UploadController::postUpload() with internal error with V1 parameters
- Check if response status is 500 with error messages set
Definition at line 964 of file UploadControllerTest.php.
◆ testPostUploadInternalErrorV2()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadInternalErrorV2 |
( |
| ) |
|
@runInSeparateProcess @preserveGlobalState disabled
- Test:
- Test for UploadController::postUpload() with internal error with V2 parameters
- Check if response status is 500 with error messages set
Definition at line 976 of file UploadControllerTest.php.
◆ testPostUploadV1()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadV1 |
( |
| ) |
|
@runInSeparateProcess @preserveGlobalState disabled
- Test:
- Test for UploadController::postUpload() with V1 parameters
- Check if response status is 201 with upload id
Definition at line 728 of file UploadControllerTest.php.
◆ testPostUploadV2()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testPostUploadV2 |
( |
| ) |
|
@runInSeparateProcess @preserveGlobalState disabled
- Test:
- Test for UploadController::postUpload() with V2 parameters
- Check if response status is 201 with upload id
Definition at line 740 of file UploadControllerTest.php.
◆ testRemoveMainLicense()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testRemoveMainLicense |
( |
| ) |
|
◆ testSetGroupsWithPermissions()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testSetGroupsWithPermissions |
( |
| ) |
|
◆ testSetGroupsWithPermissionsNotFound()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testSetGroupsWithPermissionsNotFound |
( |
| ) |
|
◆ testSetGroupsWithPermissionsUploadNotAccessible()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testSetGroupsWithPermissionsUploadNotAccessible |
( |
| ) |
|
◆ testSetMainLicense()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testSetMainLicense |
( |
| ) |
|
◆ testSetMainLicense_exists()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testSetMainLicense_exists |
( |
| ) |
|
- Test:
- Test for UploadController::setMainLicense()
- Check if response status is 400, when the license already Exists and Res body matches
Definition at line 1340 of file UploadControllerTest.php.
◆ testUpdateUpload()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testUpdateUpload |
( |
| ) |
|
◆ testUpdateUploadNoPerm()
Fossology\UI\Api\Test\Controllers\UploadControllerTest::testUpdateUploadNoPerm |
( |
| ) |
|
◆ $agentDao
AgentDao Fossology\UI\Api\Test\Controllers\UploadControllerTest::$agentDao |
|
private |
◆ $assertCountBefore
integer Fossology\UI\Api\Test\Controllers\UploadControllerTest::$assertCountBefore |
|
private |
◆ $clearingDao
ClearingDao Fossology\UI\Api\Test\Controllers\UploadControllerTest::$clearingDao |
|
private |
◆ $dbHelper
DbHelper Fossology\UI\Api\Test\Controllers\UploadControllerTest::$dbHelper |
|
private |
◆ $dbManager
DbManager Fossology\UI\Api\Test\Controllers\UploadControllerTest::$dbManager |
|
private |
◆ $folderDao
FolderDao Fossology\UI\Api\Test\Controllers\UploadControllerTest::$folderDao |
|
private |
◆ $functions
Mockery MockInterface Fossology\UI\Api\Test\Controllers\UploadControllerTest::$functions |
|
static |
◆ $groupId
integer Fossology\UI\Api\Test\Controllers\UploadControllerTest::$groupId |
|
private |
◆ $licenseDao
LicenseDao Fossology\UI\Api\Test\Controllers\UploadControllerTest::$licenseDao |
|
private |
◆ $restHelper
RestHelper Fossology\UI\Api\Test\Controllers\UploadControllerTest::$restHelper |
|
private |
◆ $reuseReportProcess
◆ $streamFactory
StreamFactory Fossology\UI\Api\Test\Controllers\UploadControllerTest::$streamFactory |
|
private |
◆ $uploadController
UploadController Fossology\UI\Api\Test\Controllers\UploadControllerTest::$uploadController |
|
private |
◆ $uploadDao
UploadDao Fossology\UI\Api\Test\Controllers\UploadControllerTest::$uploadDao |
|
private |
◆ $uploadPermissionDao
UploadPermissionDao Fossology\UI\Api\Test\Controllers\UploadControllerTest::$uploadPermissionDao |
|
private |
◆ $userId
integer Fossology\UI\Api\Test\Controllers\UploadControllerTest::$userId |
|
private |
The documentation for this class was generated from the following file: