FOSSology  4.4.0
Open Source License Compliance by Open Source Software
Fossology\Lib\Application\RepositoryApiTest Class Reference

Test for RepositoryApi. More...

Inheritance diagram for Fossology\Lib\Application\RepositoryApiTest:
Inheritance graph
Collaboration diagram for Fossology\Lib\Application\RepositoryApiTest:
Collaboration graph

Public Member Functions

 tearDown ()
 Tear down mock objects. More...
 
 testGetLatestRelease ()
 Test for RepositoryApi::getLatestRelease() More...
 
 testGetCommitsOfLastDays ()
 Test for RepositoryApi::getCommitsOfLastDays() More...
 

Protected Member Functions

 setUp ()
 One time setup for test. More...
 

Private Attributes

 $mockCurlRequest
 

Detailed Description

Test for RepositoryApi.

Definition at line 17 of file RepositoryApiTest.php.

Member Function Documentation

◆ setUp()

Fossology\Lib\Application\RepositoryApiTest::setUp ( )
protected

One time setup for test.

Mock the CurlRequest class and set mockCurlRequest variable

See also
PHPUnit::Framework::TestCase::setUp()

Definition at line 29 of file RepositoryApiTest.php.

◆ tearDown()

Fossology\Lib\Application\RepositoryApiTest::tearDown ( )

Tear down mock objects.

See also
PHPUnit::Framework::TestCase::tearDown()

Definition at line 50 of file RepositoryApiTest.php.

◆ testGetCommitsOfLastDays()

Fossology\Lib\Application\RepositoryApiTest::testGetCommitsOfLastDays ( )

Test for RepositoryApi::getCommitsOfLastDays()

Test:
  1. Mock CurlRequestService object and pass to RepositoryApi
  2. Get the result of RepositoryApi::getCommitsOfLastDays()
  3. Check if you receive array (key => value)

Definition at line 80 of file RepositoryApiTest.php.

◆ testGetLatestRelease()

Fossology\Lib\Application\RepositoryApiTest::testGetLatestRelease ( )

Test for RepositoryApi::getLatestRelease()

Test:
  1. Mock CurlRequestService object and pass to RepositoryApi
  2. Get the result of RepositoryApi::getLatestRelease()
  3. Check if you receive array (key => value)

Definition at line 62 of file RepositoryApiTest.php.

Member Data Documentation

◆ $mockCurlRequest

CurlRequest Fossology\Lib\Application\RepositoryApiTest::$mockCurlRequest
private

CurlRequest object for testing

Definition at line 21 of file RepositoryApiTest.php.


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