Test for FolderController.
More...
Test for FolderController.
Definition at line 75 of file FolderControllerTest.php.
◆ getFolder()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::getFolder |
( |
|
$id | ) |
|
Helper function to generate pseudo Folder objects
- Parameters
-
integer | $id | Folder ID to generate |
- Returns
- NULL|\Fossology\Lib\Data\Folder\Folder
Definition at line 202 of file FolderControllerTest.php.
◆ getFolderParent()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::getFolderParent |
( |
|
$id | ) |
|
Helper function to get pseudo parent id of given folder
- Parameters
-
integer | $id | Folder id to get parent |
- Returns
- int|NULL
Definition at line 221 of file FolderControllerTest.php.
◆ getResponseJson()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::getResponseJson |
( |
|
$response | ) |
|
|
private |
◆ setUp()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::setUp |
( |
| ) |
|
|
protected |
◆ tearDown()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::tearDown |
( |
| ) |
|
|
protected |
◆ testCopyFolder()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolder |
( |
|
$version = ApiVersion::V2 | ) |
|
|
private |
◆ testCopyFolderInvalidAction()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderInvalidAction |
( |
|
$version = ApiVersion::V2 | ) |
|
|
private |
◆ testCopyFolderInvalidActionV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderInvalidActionV1 |
( |
| ) |
|
- Test:
- Test for invalid action on FolderController::copyFolder() with version 1 attributes
- Check for 400 response
Definition at line 1080 of file FolderControllerTest.php.
◆ testCopyFolderInvalidActionV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderInvalidActionV2 |
( |
| ) |
|
- Test:
- Test for invalid action on FolderController::copyFolder() with version 2 attributes
- Check for 400 response
Definition at line 1089 of file FolderControllerTest.php.
◆ testCopyFolderNotAccessible()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderNotAccessible |
( |
|
$version = ApiVersion::V2 | ) |
|
|
private |
◆ testCopyFolderNotAccessibleV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderNotAccessibleV1 |
( |
| ) |
|
- Test:
- Test for inaccessible folder on FolderController::copyFolder() with version 1 attributes
- Check for 403 response
Definition at line 983 of file FolderControllerTest.php.
◆ testCopyFolderNotAccessibleV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderNotAccessibleV2 |
( |
| ) |
|
- Test:
- Test for inaccessible folder on FolderController::copyFolder() with version 2 attributes
- Check for 403 response
Definition at line 992 of file FolderControllerTest.php.
◆ testCopyFolderNotFoundV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderNotFoundV1 |
( |
| ) |
|
- Test:
- Test for invalid folder copy on FolderController::copyFolder() with version 1 attributes
- Check for 404 response
Definition at line 893 of file FolderControllerTest.php.
◆ testCopyFolderNotFoundV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderNotFoundV2 |
( |
| ) |
|
- Test:
- Test for invalid folder copy on FolderController::copyFolder() with version 2 attributes
- Check for 404 response
Definition at line 902 of file FolderControllerTest.php.
◆ testCopyFolderV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderV1 |
( |
| ) |
|
- Test:
- Test for copy action on FolderController::copyFolder() with version 1 attributes
- Check for 202 response
Definition at line 761 of file FolderControllerTest.php.
◆ testCopyFolderV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyFolderV2 |
( |
| ) |
|
- Test:
- Test for copy action on FolderController::copyFolder() with version 2 attributes
- Check for 202 response
Definition at line 770 of file FolderControllerTest.php.
◆ testCopyParentFolderNotAccessibleV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyParentFolderNotAccessibleV1 |
( |
| ) |
|
- Test:
- Test for inaccessible parent folder on FolderController::copyFolder() with version 1 attributes
- Check for 403 response
Definition at line 1033 of file FolderControllerTest.php.
◆ testCopyParentFolderNotAccessibleV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyParentFolderNotAccessibleV2 |
( |
| ) |
|
- Test:
- Test for inaccessible parent folder on FolderController::copyFolder() with version 2 attributes
- Check for 403 response
Definition at line 1042 of file FolderControllerTest.php.
◆ testCopyParentFolderNotFoundV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyParentFolderNotFoundV1 |
( |
| ) |
|
- Test:
- Test for invalid parent copy on FolderController::copyFolder() with version 1 attributes
- Check for 404 response
Definition at line 936 of file FolderControllerTest.php.
◆ testCopyParentFolderNotFoundV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCopyParentFolderNotFoundV2 |
( |
| ) |
|
- Test:
- Test for invalid parent copy on FolderController::copyFolder() with version 2 attributes
- Check for 404 response
Definition at line 945 of file FolderControllerTest.php.
◆ testCreateFolder()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolder |
( |
|
$version = ApiVersion::V2 | ) |
|
|
private |
◆ testCreateFolderDuplicateNames()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolderDuplicateNames |
( |
|
$version = ApiVersion::V2 | ) |
|
|
private |
◆ testCreateFolderDuplicateNamesV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolderDuplicateNamesV1 |
( |
| ) |
|
- Test:
- FolderController::createFolder() with version 1 attributes
- Check for duplicate folder response from FolderController::createFolder()
- Check for 200 response
Definition at line 492 of file FolderControllerTest.php.
◆ testCreateFolderDuplicateNamesV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolderDuplicateNamesV2 |
( |
| ) |
|
- Test:
- FolderController::createFolder() with version 2 attributes
- Check for duplicate folder response from FolderController::createFolder()
- Check for 200 response
Definition at line 502 of file FolderControllerTest.php.
◆ testCreateFolderInvalidBody()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolderInvalidBody |
( |
| ) |
|
◆ testCreateFolderParentNotAccessible()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolderParentNotAccessible |
( |
|
$version = ApiVersion::V2 | ) |
|
|
private |
◆ testCreateFolderParentNotAccessibleV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolderParentNotAccessibleV1 |
( |
| ) |
|
- Test:
- Check for inaccessible parent on FolderController::createFolder() with version 1 attributes
- Check for 403 response
Definition at line 444 of file FolderControllerTest.php.
◆ testCreateFolderParentNotAccessibleV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolderParentNotAccessibleV2 |
( |
| ) |
|
- Test:
- Check for inaccessible parent on FolderController::createFolder() with version 1 attributes
- Check for 403 response
Definition at line 453 of file FolderControllerTest.php.
◆ testCreateFolderV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolderV1 |
( |
| ) |
|
- Test:
- Check for FolderController::createFolder() with version 1 attributes
- Check for 201 response with folder id
Definition at line 367 of file FolderControllerTest.php.
◆ testCreateFolderV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testCreateFolderV2 |
( |
| ) |
|
- Test:
- Check for FolderController::createFolder() with version 2 attributes
- Check for 201 response with folder id
Definition at line 376 of file FolderControllerTest.php.
◆ testDeleteFolder()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testDeleteFolder |
( |
| ) |
|
◆ testDeleteFolderInvalidFolder()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testDeleteFolderInvalidFolder |
( |
| ) |
|
◆ testDeleteFolderNoAccess()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testDeleteFolderNoAccess |
( |
| ) |
|
◆ testEditFolder()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testEditFolder |
( |
|
$version = ApiVersion::V2 | ) |
|
|
private |
◆ testEditFolderNotAccessible()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testEditFolderNotAccessible |
( |
|
$version = ApiVersion::V2 | ) |
|
|
private |
◆ testEditFolderNotAccessibleV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testEditFolderNotAccessibleV1 |
( |
| ) |
|
- Test:
- Test for inaccessible folder on FolderController::editFolder() with version 1 attributes
- Check for 403 response
Definition at line 710 of file FolderControllerTest.php.
◆ testEditFolderNotAccessibleV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testEditFolderNotAccessibleV2 |
( |
| ) |
|
- Test:
- Test for inaccessible folder on FolderController::editFolder() with version 2 attributes
- Check for 403 response
Definition at line 719 of file FolderControllerTest.php.
◆ testEditFolderNotExistsV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testEditFolderNotExistsV1 |
( |
| ) |
|
- Test:
- Check FolderController::editFolder() on non-existing folder with version 1 attributes
- Check for 404 response
Definition at line 667 of file FolderControllerTest.php.
◆ testEditFolderNotExistsV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testEditFolderNotExistsV2 |
( |
| ) |
|
- Test:
- Check FolderController::editFolder() on non-existing folder with version 2 attributes
- Check for 404 response
Definition at line 676 of file FolderControllerTest.php.
◆ testEditFolderV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testEditFolderV1 |
( |
| ) |
|
◆ testEditFolderV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testEditFolderV2 |
( |
| ) |
|
◆ testGetAllFolderContents()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetAllFolderContents |
( |
| ) |
|
◆ testGetAllFolderContentsNotFound()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetAllFolderContentsNotFound |
( |
| ) |
|
- Test:
- Test for invalid action on FolderController::getAllFolderContents()
- Check if the HttpNotFoundException is thrown
Definition at line 1192 of file FolderControllerTest.php.
◆ testGetAllFolders()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetAllFolders |
( |
| ) |
|
◆ testGetAllFoldersNotFound()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetAllFoldersNotFound |
( |
| ) |
|
◆ testGetAllInAccessibleFolderContents()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetAllInAccessibleFolderContents |
( |
| ) |
|
- Test:
- Test for invalid action on FolderController::getAllFolderContents()
- Check if the HttpForbiddenException is thrown
Definition at line 1206 of file FolderControllerTest.php.
◆ testGetInAccessibleFolder()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetInAccessibleFolder |
( |
| ) |
|
◆ testGetInvalidFolder()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetInvalidFolder |
( |
| ) |
|
◆ testGetSpecificFolders()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetSpecificFolders |
( |
| ) |
|
◆ testGetUnlinkableFolderContents()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetUnlinkableFolderContents |
( |
| ) |
|
- Test:
- Test for invalid action on FolderController::getUnlinkableFolderContents()
- Check if the statusCode is 200
Definition at line 1223 of file FolderControllerTest.php.
◆ testGetUnlinkableFolderContentsBadRequest()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetUnlinkableFolderContentsBadRequest |
( |
| ) |
|
- Test:
- Test for invalid action on FolderController::getUnlinkableFolderContents()
- Check if the HttpNotFoundException is thrown
Definition at line 1264 of file FolderControllerTest.php.
◆ testGetUnlinkableInaccessibleFolderContents()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testGetUnlinkableInaccessibleFolderContents |
( |
| ) |
|
- Test:
- Test for invalid action on FolderController::getUnlinkableFolderContents()
- Check if the HttpForbiddenException is thrown
Definition at line 1245 of file FolderControllerTest.php.
◆ testMoveFolder()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testMoveFolder |
( |
|
$version = ApiVersion::V2 | ) |
|
|
private |
◆ testMoveFolderV1()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testMoveFolderV1 |
( |
| ) |
|
- Test:
- Test for move action on FolderController::copyFolder() with version 1 attributes
- Check for 202 response
Definition at line 828 of file FolderControllerTest.php.
◆ testMoveFolderV2()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testMoveFolderV2 |
( |
| ) |
|
- Test:
- Test for move action on FolderController::copyFolder() with version 2 attributes
- Check for 202 response
Definition at line 837 of file FolderControllerTest.php.
◆ testUnlinkFolderFolderNotFound()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testUnlinkFolderFolderNotFound |
( |
| ) |
|
- Test:
- Test for invalid action on FolderController::unlinkFolder()
- Check if the HttpNotFoundException is thrown
Definition at line 1137 of file FolderControllerTest.php.
◆ testUnlinkUnExistingFolder()
Fossology\UI\Api\Test\Controllers\FolderControllerTest::testUnlinkUnExistingFolder |
( |
| ) |
|
- Test:
- Test for invalid action on FolderController::unlinkFolder()
- Check if the HttpNotFoundException is thrown
Definition at line 1155 of file FolderControllerTest.php.
◆ $assertCountBefore
integer Fossology\UI\Api\Test\Controllers\FolderControllerTest::$assertCountBefore |
|
private |
◆ $dbHelper
DbHelper Fossology\UI\Api\Test\Controllers\FolderControllerTest::$dbHelper |
|
private |
◆ $deletePlugin
◆ $folderContentPlugin
AdminContentMove Fossology\UI\Api\Test\Controllers\FolderControllerTest::$folderContentPlugin |
|
private |
◆ $folderController
FolderController Fossology\UI\Api\Test\Controllers\FolderControllerTest::$folderController |
|
private |
◆ $folderDao
FolderDao Fossology\UI\Api\Test\Controllers\FolderControllerTest::$folderDao |
|
private |
◆ $folderPlugin
folder_create Fossology\UI\Api\Test\Controllers\FolderControllerTest::$folderPlugin |
|
private |
◆ $folderPropertiesPlugin
folder_properties Fossology\UI\Api\Test\Controllers\FolderControllerTest::$folderPropertiesPlugin |
|
private |
◆ $restHelper
RestHelper Fossology\UI\Api\Test\Controllers\FolderControllerTest::$restHelper |
|
private |
◆ $streamFactory
StreamFactory Fossology\UI\Api\Test\Controllers\FolderControllerTest::$streamFactory |
|
private |
◆ $userId
integer Fossology\UI\Api\Test\Controllers\FolderControllerTest::$userId |
|
private |
The documentation for this class was generated from the following file: