FOSSology  4.4.0
Open Source License Compliance by Open Source Software
CommonCliTest Class Reference

Tests for common CLI operations. More...

Inheritance diagram for CommonCliTest:
Inheritance graph
Collaboration diagram for CommonCliTest:
Collaboration graph

Public Member Functions

 testHelp ()
 Test for nomos help message. More...
 

Protected Member Functions

 setUp ()
 Setup the test cases and initialize the objects. More...
 
 tearDown ()
 Destruct the objects initialized during setUp() More...
 
 runNomos ($args="", $files=array())
 Run nomos using the arguments passed. More...
 

Protected Attributes

 $testDb
 
 $testInstaller
 
 $agentDir
 

Detailed Description

Tests for common CLI operations.

Definition at line 22 of file CommonCliTest.php.

Member Function Documentation

◆ runNomos()

CommonCliTest::runNomos (   $args = "",
  $files = array() 
)
protected

Run nomos using the arguments passed.

  1. The function setups the test environment required for the agent to run.
  2. Run the agent with the arguments passed and pass the files to the agent
    Parameters
    string$argsCLI arguments for the nomos agent
    array$filesFile paths to scan by nomos
    Returns
    string[] Output and return code

Definition at line 92 of file CommonCliTest.php.

◆ setUp()

CommonCliTest::setUp ( )
protected

Setup the test cases and initialize the objects.

See also
PHPUnit_Framework_TestCase::setUp()

Reimplemented in OneShotgplv21Test, and NomosFunTest.

Definition at line 47 of file CommonCliTest.php.

◆ tearDown()

CommonCliTest::tearDown ( )
protected

Destruct the objects initialized during setUp()

See also
PHPUnit_Framework_TestCase::tearDown()

Definition at line 75 of file CommonCliTest.php.

◆ testHelp()

CommonCliTest::testHelp ( )

Test for nomos help message.

Test:
  1. Call runNomos() with -h to get help message
  2. Check the output for help message

Definition at line 135 of file CommonCliTest.php.


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