FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\UI\Api\Helper\RestHelperTest Class Reference

Test cases for RestHelper. More...

Inheritance diagram for Fossology\UI\Api\Helper\RestHelperTest:
Inheritance graph
Collaboration diagram for Fossology\UI\Api\Helper\RestHelperTest:
Collaboration graph

Public Member Functions

 testCopyUpload ()
 
 testValidateTokenRequest ()
 
 testValidateTokenRequestMaxExpire ()
 
 testValidateTokenRequestInvalidExpire ()
 
 testValidateTokenRequestInvalidScope ()
 

Static Public Attributes

static $functions
 

Protected Member Functions

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

Private Attributes

 $uploadDao
 
 $dbHelper
 
 $uploadPermissionDao
 
 $folderDao
 
 $userDao
 
 $jobDao
 
 $showJobDao
 
 $authHelper
 
 $session
 
 $restHelper
 
 $userId
 
 $groupId
 
 $contentMovePlugin
 
 $assertCountBefore
 

Detailed Description

Test cases for RestHelper.

Definition at line 41 of file RestHelperTest.php.

Member Function Documentation

◆ setUp()

Fossology\UI\Api\Helper\RestHelperTest::setUp ( )
protected

Setup test objects.

See also
PHPUnit_Framework_TestCase::setUp()

Definition at line 123 of file RestHelperTest.php.

◆ tearDown()

Fossology\UI\Api\Helper\RestHelperTest::tearDown ( )
protected

Remove test objects.

See also
PHPUnit_Framework_TestCase::tearDown()

Definition at line 163 of file RestHelperTest.php.

◆ testCopyUpload()

Fossology\UI\Api\Helper\RestHelperTest::testCopyUpload ( )
Test:
  1. Test for RestHelper::copyUpload()
  2. Check if the response for RestHelper::copyUpload() is 202

Definition at line 175 of file RestHelperTest.php.

◆ testValidateTokenRequest()

Fossology\UI\Api\Helper\RestHelperTest::testValidateTokenRequest ( )
Test:
  1. Test for RestHelper::validateTokenRequest()
  2. Check if RestHelper::validateTokenRequest() accepts valid requests

Definition at line 211 of file RestHelperTest.php.

◆ testValidateTokenRequestInvalidExpire()

Fossology\UI\Api\Helper\RestHelperTest::testValidateTokenRequestInvalidExpire ( )
Test:
  1. Test for RestHelper::validateTokenRequest() with invalid date format
  2. Check if response is 400 with valid message.

Definition at line 249 of file RestHelperTest.php.

◆ testValidateTokenRequestInvalidScope()

Fossology\UI\Api\Helper\RestHelperTest::testValidateTokenRequestInvalidScope ( )
Test:
  1. Test RestHelper::validateTokenRequest() with invalid scope
  2. Check if the response is 400 with valid message.

Definition at line 269 of file RestHelperTest.php.

◆ testValidateTokenRequestMaxExpire()

Fossology\UI\Api\Helper\RestHelperTest::testValidateTokenRequestMaxExpire ( )
Test:
  1. Test for RestHelper::validateTokenRequest() with expire > max valid
  2. Check if response is 400 with valid message.

Definition at line 229 of file RestHelperTest.php.

Member Data Documentation

◆ $assertCountBefore

integer Fossology\UI\Api\Helper\RestHelperTest::$assertCountBefore
private

Assertions before running tests

Definition at line 117 of file RestHelperTest.php.

◆ $authHelper

AuthHelper Fossology\UI\Api\Helper\RestHelperTest::$authHelper
private

AuthHelper mock

Definition at line 87 of file RestHelperTest.php.

◆ $contentMovePlugin

Mockery MockInterface Fossology\UI\Api\Helper\RestHelperTest::$contentMovePlugin
private

content_move plugin mock

Definition at line 112 of file RestHelperTest.php.

◆ $dbHelper

DbHelper Fossology\UI\Api\Helper\RestHelperTest::$dbHelper
private

DbHelper mock

Definition at line 57 of file RestHelperTest.php.

◆ $folderDao

FolderDao Fossology\UI\Api\Helper\RestHelperTest::$folderDao
private

FolderDao mock

Definition at line 67 of file RestHelperTest.php.

◆ $functions

Mockery MockInterface Fossology\UI\Api\Helper\RestHelperTest::$functions
static

Mock of public functions

Definition at line 47 of file RestHelperTest.php.

◆ $groupId

integer Fossology\UI\Api\Helper\RestHelperTest::$groupId
private

Group id

Definition at line 107 of file RestHelperTest.php.

◆ $jobDao

JobDao Fossology\UI\Api\Helper\RestHelperTest::$jobDao
private

JobDao mock

Definition at line 77 of file RestHelperTest.php.

◆ $restHelper

RestHelper Fossology\UI\Api\Helper\RestHelperTest::$restHelper
private

RestHelper mock

Definition at line 97 of file RestHelperTest.php.

◆ $session

Session Fossology\UI\Api\Helper\RestHelperTest::$session
private

Session mock

Definition at line 92 of file RestHelperTest.php.

◆ $showJobDao

ShowJobsDao Fossology\UI\Api\Helper\RestHelperTest::$showJobDao
private

ShowJobsDao mock

Definition at line 82 of file RestHelperTest.php.

◆ $uploadDao

UploadDao Fossology\UI\Api\Helper\RestHelperTest::$uploadDao
private

UploadDao mock

Definition at line 52 of file RestHelperTest.php.

◆ $uploadPermissionDao

UploadPermissionDao Fossology\UI\Api\Helper\RestHelperTest::$uploadPermissionDao
private

UploadPermissionDao mock

Definition at line 62 of file RestHelperTest.php.

◆ $userDao

UserDao Fossology\UI\Api\Helper\RestHelperTest::$userDao
private

UserDao mock

Definition at line 72 of file RestHelperTest.php.

◆ $userId

integer Fossology\UI\Api\Helper\RestHelperTest::$userId
private

User id

Definition at line 102 of file RestHelperTest.php.


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