FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Test for LicenseCsvImport. More...
Public Member Functions | |
testGetKeyFromShortname () | |
Test for LicenseCsvImport::getKeyFromShortname() More... | |
testGetKeyFromMd5 () | |
Test for LicenseCsvImport::getKeyFromMd5() More... | |
testHandleCsvLicense () | |
Test for LicenseCsvImport::handleCsvLicense() More... | |
testHandleHeadCsv () | |
Test for LicenseCsvImport::handleHeadCsv() More... | |
testHandleHeadCsv_missingMandidatoryKey () | |
Test for LicenseCsvImport::handleHeadCsv() More... | |
testSetDelimiter () | |
Test for LicenseCsvImport::setDelimiter() More... | |
testSetEnclosure () | |
Test for LicenseCsvImport::setEnclosure() More... | |
testHandleCsv () | |
Test for LicenseCsvImport::handleCsv() More... | |
testHandleFileIfFileNotExists () | |
Test for LicenseCsvImport::handleFile() (non-existing file) More... | |
testHandleFileIfFileIsNotParsable () | |
Test for LicenseCsvImport::handleFile() (non-csv file) More... | |
testHandleFile () | |
Test for LicenseCsvImport::handleFile() (csv file with header) More... | |
Protected Member Functions | |
setUp () | |
One time setup for test. More... | |
tearDown () | |
Close mockery. More... | |
Private Member Functions | |
createCandidateTable ($dbManager) | |
addLicenseInsertToDbManager (&$dbManager, $row, $return, $table="license_ref") | |
Test for LicenseCsvImport.
Definition at line 22 of file LicenseCsvImportTest.php.
|
private |
Add a new mockery handler for new license insertion in DB
DbManager | $dbManager | The mock object of DbManager |
array | $row | The associated array |
mixed | $return | The value which should be returned |
string | $table | The table where new data should go |
Definition at line 744 of file LicenseCsvImportTest.php.
|
private |
Create candidate license table
DbManager | $dbManager |
Definition at line 729 of file LicenseCsvImportTest.php.
|
protected |
One time setup for test.
Definition at line 28 of file LicenseCsvImportTest.php.
|
protected |
Close mockery.
Definition at line 37 of file LicenseCsvImportTest.php.
Fossology\Lib\Application\LicenseCsvImportTest::testGetKeyFromMd5 | ( | ) |
Test for LicenseCsvImport::getKeyFromMd5()
license_ref
.Definition at line 97 of file LicenseCsvImportTest.php.
Fossology\Lib\Application\LicenseCsvImportTest::testGetKeyFromShortname | ( | ) |
Test for LicenseCsvImport::getKeyFromShortname()
license_ref
.Definition at line 52 of file LicenseCsvImportTest.php.
Fossology\Lib\Application\LicenseCsvImportTest::testHandleCsv | ( | ) |
Test for LicenseCsvImport::handleCsv()
Definition at line 539 of file LicenseCsvImportTest.php.
Fossology\Lib\Application\LicenseCsvImportTest::testHandleCsvLicense | ( | ) |
Test for LicenseCsvImport::handleCsvLicense()
Definition at line 129 of file LicenseCsvImportTest.php.
Fossology\Lib\Application\LicenseCsvImportTest::testHandleFile | ( | ) |
Test for LicenseCsvImport::handleFile() (csv file with header)
head okay
. Definition at line 620 of file LicenseCsvImportTest.php.
Fossology\Lib\Application\LicenseCsvImportTest::testHandleFileIfFileIsNotParsable | ( | ) |
Test for LicenseCsvImport::handleFile() (non-csv file)
Error while parsing file
Definition at line 604 of file LicenseCsvImportTest.php.
Fossology\Lib\Application\LicenseCsvImportTest::testHandleFileIfFileNotExists | ( | ) |
Test for LicenseCsvImport::handleFile() (non-existing file)
Internal error
Definition at line 589 of file LicenseCsvImportTest.php.
Fossology\Lib\Application\LicenseCsvImportTest::testHandleHeadCsv | ( | ) |
Test for LicenseCsvImport::handleHeadCsv()
Definition at line 441 of file LicenseCsvImportTest.php.
Fossology\Lib\Application\LicenseCsvImportTest::testHandleHeadCsv_missingMandidatoryKey | ( | ) |
Test for LicenseCsvImport::handleHeadCsv()
Definition at line 479 of file LicenseCsvImportTest.php.
Fossology\Lib\Application\LicenseCsvImportTest::testSetDelimiter | ( | ) |
Test for LicenseCsvImport::setDelimiter()
Definition at line 497 of file LicenseCsvImportTest.php.
Fossology\Lib\Application\LicenseCsvImportTest::testSetEnclosure | ( | ) |
Test for LicenseCsvImport::setEnclosure()
Definition at line 519 of file LicenseCsvImportTest.php.