![]() |
FOSSology
4.5.1
Open Source License Compliance by Open Source Software
|
Tests for TokenRequest model. More...


Public Member Functions | |
| testConstructor () | |
| testGetTokenName () | |
| testGetTokenScope () | |
| testGetTokenExpire () | |
| testGetUsername () | |
| testGetPassword () | |
| testSetTokenName () | |
| testSetTokenScope () | |
| testSetTokenExpire () | |
| testSetUsername () | |
| testSetPassword () | |
| testFromArrayVersion1 () | |
| testFromArrayVersion2 () | |
| testFromArrayMissingKeys () | |
Protected Member Functions | |
| setUp () | |
Private Attributes | |
| $sampleData | |
Tests for TokenRequest model.
Definition at line 24 of file TokenRequestTest.php.
|
protected |
Sets up sample data before every test
Definition at line 31 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testConstructor | ( | ) |
Tests that the TokenRequest constructor initializes an instance correctly.
Definition at line 49 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testFromArrayMissingKeys | ( | ) |
Tests TokenRequest::fromArray() when required keys are missing.
This test ensures that calling fromArray() with an incomplete input array (missing required keys) throws an HttpBadRequestException.
Expected Behavior:
| HttpBadRequestException | If required keys are missing. |
Definition at line 223 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testFromArrayVersion1 | ( | ) |
Tests the TokenRequest::fromArray() method for version 1.
This test verifies that calling fromArray() with a valid input array and version 1 correctly returns an instance of the TokenRequest class.
Definition at line 174 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testFromArrayVersion2 | ( | ) |
Tests the TokenRequest::fromArray() method for version 2.
This test verifies that calling fromArray() with a valid input array and version 2 correctly returns an instance of the TokenRequest class.
Definition at line 196 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testGetPassword | ( | ) |
Definition at line 101 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testGetTokenExpire | ( | ) |
Definition at line 81 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testGetTokenName | ( | ) |
Definition at line 61 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testGetTokenScope | ( | ) |
Definition at line 71 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testGetUsername | ( | ) |
Definition at line 91 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testSetPassword | ( | ) |
Definition at line 157 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testSetTokenExpire | ( | ) |
Definition at line 135 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testSetTokenName | ( | ) |
Definition at line 113 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testSetTokenScope | ( | ) |
Definition at line 124 of file TokenRequestTest.php.
| Fossology\UI\Api\Test\Models\TokenRequestTest::testSetUsername | ( | ) |
Definition at line 146 of file TokenRequestTest.php.