Tests for ReportController.
More...
Tests for ReportController.
Definition at line 40 of file ReportControllerTest.php.
◆ getResponseForReport()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::getResponseForReport |
( |
|
$uploadId, |
|
|
|
$reportFormat |
|
) |
| |
|
private |
Helper function to call ReportController::getReport() and return response
- Parameters
-
integer | $uploadId | |
string | $reportFormat | |
- Returns
- Response
Definition at line 242 of file ReportControllerTest.php.
◆ getResponseJson()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::getResponseJson |
( |
|
$response | ) |
|
|
private |
◆ getUpload()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::getUpload |
( |
|
$id | ) |
|
|
private |
Helper function to generate uploads
- Parameters
-
integer | $id | Upload id (if > 4, return NULL) |
- Returns
- NULL|\Fossology\Lib\Data\Upload\Upload
Definition at line 211 of file ReportControllerTest.php.
◆ setUp()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::setUp |
( |
| ) |
|
|
protected |
◆ tearDown()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::tearDown |
( |
| ) |
|
|
protected |
◆ testDownloadReport()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::testDownloadReport |
( |
| ) |
|
- Test:
- Test ReportController::downloadReport()
- Generate all mock objects
- Generate a temporary file to be downloaded
- Replicate expected headers
- Check for actual headers
- Check for actual file content
Definition at line 357 of file ReportControllerTest.php.
◆ testDownloadReportInAccessibleUpload()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::testDownloadReportInAccessibleUpload |
( |
| ) |
|
◆ testDownloadReportInvalidUpload()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::testDownloadReportInvalidUpload |
( |
| ) |
|
◆ testDownloadReportTryLater()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::testDownloadReportTryLater |
( |
| ) |
|
- Test:
- Test ReportController::downloadReport() for early download
- Check for 503 response with
Retry-After
headers.
Definition at line 462 of file ReportControllerTest.php.
◆ testGetReportAllFormats()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::testGetReportAllFormats |
( |
| ) |
|
◆ testGetReportInaccessibleUpload()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::testGetReportInaccessibleUpload |
( |
| ) |
|
◆ testGetReportInvalidFormat()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::testGetReportInvalidFormat |
( |
| ) |
|
◆ testGetReportInvalidUpload()
Fossology\UI\Api\Test\Controllers\ReportControllerTest::testGetReportInvalidUpload |
( |
| ) |
|
◆ $assertCountBefore
integer Fossology\UI\Api\Test\Controllers\ReportControllerTest::$assertCountBefore |
|
private |
◆ $clixmlPlugin
M MockInterface Fossology\UI\Api\Test\Controllers\ReportControllerTest::$clixmlPlugin |
|
private |
◆ $dbManager
DbManager Fossology\UI\Api\Test\Controllers\ReportControllerTest::$dbManager |
|
private |
◆ $decisionExporterPlugin
M MockInterface Fossology\UI\Api\Test\Controllers\ReportControllerTest::$decisionExporterPlugin |
|
private |
◆ $downloadPlugin
M MockInterface Fossology\UI\Api\Test\Controllers\ReportControllerTest::$downloadPlugin |
|
private |
◆ $groupId
integer Fossology\UI\Api\Test\Controllers\ReportControllerTest::$groupId |
|
private |
◆ $readmeossPlugin
M MockInterface Fossology\UI\Api\Test\Controllers\ReportControllerTest::$readmeossPlugin |
|
private |
◆ $reportController
ReportController Fossology\UI\Api\Test\Controllers\ReportControllerTest::$reportController |
|
private |
◆ $reportsAllowed
array Fossology\UI\Api\Test\Controllers\ReportControllerTest::$reportsAllowed |
|
private |
Initial value:= array(
'dep5',
'spdx2',
'spdx2tv',
'readmeoss',
'unifiedreport',
'clixml',
'decisionexporter'
)
Allowed agent names to create report
Definition at line 47 of file ReportControllerTest.php.
◆ $spdxPlugin
M MockInterface Fossology\UI\Api\Test\Controllers\ReportControllerTest::$spdxPlugin |
|
private |
◆ $streamFactory
StreamFactory Fossology\UI\Api\Test\Controllers\ReportControllerTest::$streamFactory |
|
private |
◆ $unifiedPlugin
M MockInterface Fossology\UI\Api\Test\Controllers\ReportControllerTest::$unifiedPlugin |
|
private |
◆ $uploadDao
UploadDao Fossology\UI\Api\Test\Controllers\ReportControllerTest::$uploadDao |
|
private |
◆ $userId
integer Fossology\UI\Api\Test\Controllers\ReportControllerTest::$userId |
|
private |
The documentation for this class was generated from the following file: