FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
Fossology\SpdxTwo\spdx2Test Class Reference

Unit tests for SPDX2. More...

Inheritance diagram for Fossology\SpdxTwo\spdx2Test:
Inheritance graph
Collaboration diagram for Fossology\SpdxTwo\spdx2Test:
Collaboration graph

Public Member Functions

 testPreWorkOnArgsFlpZero ()
 Test preWorkOnArgsFlp() with empty array. More...
 
 testPreWorkOnArgsFlpId ()
 Test preWorkOnArgsFlp() with args containing only key1. More...
 
 testPreWorkOnArgsFlpRealWork ()
 Test preWorkOnArgsFlp() with actual format. More...
 
 testAddPrefixOnDemandNoChecker ()
 Test addPrefixOnDemand() with no check. More...
 
 provideLicenseSetAddPrefixOnDemand ()
 Prefix provider for licenses. More...
 
 testAddPrefixOnDemand ($licenseId, $checker, $expected)
 Test addPrefixOnDemand() provideLicenseSetAddPrefixOnDemand. More...
 
 provideLicenseSetAddPrefixOnDemandList ()
 Prefix provider for license list. More...
 
 testAddPrefixOnDemandList ($licenseIds, $checker, $expected)
 Test for addPrefixOnDemandList() provideLicenseSetAddPrefixOnDemandList. More...
 
 provideLicenseSetImplodeLicenses ()
 Prefix provider for license implode. More...
 
 testImplodeLicenses ($lics, $prefix, $expected)
 Test implodeLicenses() provideLicenseSetImplodeLicenses. More...
 

Protected Member Functions

 setUp ()
 Setup test env. More...
 
 tearDown ()
 Tear down test env. More...
 

Private Attributes

 $assertCountBefore
 Assertion count.
 

Detailed Description

Unit tests for SPDX2.

Definition at line 33 of file spdx2utilTest.php.

Member Function Documentation

Fossology\SpdxTwo\spdx2Test::provideLicenseSetAddPrefixOnDemand ( )

Prefix provider for licenses.

Returns
string[][]

Definition at line 111 of file spdx2utilTest.php.

Fossology\SpdxTwo\spdx2Test::provideLicenseSetAddPrefixOnDemandList ( )

Prefix provider for license list.

Returns
string[][]

Definition at line 147 of file spdx2utilTest.php.

Fossology\SpdxTwo\spdx2Test::provideLicenseSetImplodeLicenses ( )

Prefix provider for license implode.

Returns
string[][]

Definition at line 196 of file spdx2utilTest.php.

Fossology\SpdxTwo\spdx2Test::setUp ( )
protected

Setup test env.

See also
PHPUnit_Framework_TestCase::setUp()

Definition at line 41 of file spdx2utilTest.php.

Fossology\SpdxTwo\spdx2Test::tearDown ( )
protected

Tear down test env.

See also
PHPUnit_Framework_TestCase::tearDown()

Definition at line 50 of file spdx2utilTest.php.

Fossology\SpdxTwo\spdx2Test::testAddPrefixOnDemand (   $licenseId,
  $checker,
  $expected 
)

Test addPrefixOnDemand() provideLicenseSetAddPrefixOnDemand.

Parameters
string$licenseId
callable$checker
string$expected

Definition at line 138 of file spdx2utilTest.php.

Fossology\SpdxTwo\spdx2Test::testAddPrefixOnDemandList (   $licenseIds,
  $checker,
  $expected 
)

Test for addPrefixOnDemandList() provideLicenseSetAddPrefixOnDemandList.

Parameters
array$licenseIds
callable$checker
string$expected

Definition at line 187 of file spdx2utilTest.php.

Fossology\SpdxTwo\spdx2Test::testAddPrefixOnDemandNoChecker ( )

Test addPrefixOnDemand() with no check.

Test:
  1. Call addPrefixOnDemand() with no check
  2. Check if original string is returned

Definition at line 102 of file spdx2utilTest.php.

Fossology\SpdxTwo\spdx2Test::testImplodeLicenses (   $lics,
  $prefix,
  $expected 
)

Test implodeLicenses() provideLicenseSetImplodeLicenses.

Parameters
array$lics
string$prefix
string$expected

Definition at line 244 of file spdx2utilTest.php.

Fossology\SpdxTwo\spdx2Test::testPreWorkOnArgsFlpId ( )

Test preWorkOnArgsFlp() with args containing only key1.

Test:
  1. Create args array with only key1
  2. Call preWorkOnArgsFlp() with key1 and key2
  3. Check if args array is not modified

Definition at line 75 of file spdx2utilTest.php.

Fossology\SpdxTwo\spdx2Test::testPreWorkOnArgsFlpRealWork ( )

Test preWorkOnArgsFlp() with actual format.

Test:
  1. Create args array with key1 containing --key2= as a value
  2. Call preWorkOnArgsFlp() with key1 and key2
  3. Check if array with proper assignment is returned

Definition at line 88 of file spdx2utilTest.php.

Fossology\SpdxTwo\spdx2Test::testPreWorkOnArgsFlpZero ( )

Test preWorkOnArgsFlp() with empty array.

Test:
  1. Create empty args array
  2. Call preWorkOnArgsFlp()
  3. Check if empty array is returned

Definition at line 62 of file spdx2utilTest.php.


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