FOSSology
4.4.0
Open Source License Compliance by Open Source Software
|
Public Member Functions | |
getBrowser () | |
getCookie () | |
getPassword () | |
getUser () | |
setBrowser ($browser) | |
setmyCookie ($cookie) | |
setPassword ($password) | |
setUser ($user) | |
pmm ($test) | |
plt ($test) | |
createTestFolder ($name, $parent='root') | |
getFolderId ($folderName, $page, $selectName) | |
getUploadId ($uploadName, $page, $selectName) | |
Login ($User=NULL, $Password=NULL) | |
Logout ($User=NULL) | |
myassertText ($page, $pattern) | |
parseSelectStmnt ($page, $selectName, $optionText=NULL) | |
parseFossjobs ($all=NULL) | |
setAgents ($agents=NULL) | |
Public Attributes | |
$mybrowser | |
$cookie | |
$debug | |
Protected Member Functions | |
_browser () | |
getSelectAttr ($page, $selectName) | |
setSelectAttr ($page, $selectName, $attribute, $value=NULL) | |
Protected Attributes | |
$User = NULL | |
Private Member Functions | |
_repoDBlogin ($browser=NULL) | |
__chopPage ($page) | |
Private Attributes | |
$Url | |
$Password = NULL | |
Base clase for fossologyTestCase. Most FOSSology tests should not extend this class. Extend fossologyTestCase instead.
Only put methods in here that more than one fossologyTestCase can use.
Definition at line 40 of file fossologyTest.php.
|
private |
__chopPage
return the last 1.5K characters of the string, useful for just looking at the end of a returned page.
string | $page |
Definition at line 690 of file fossologyTest.php.
|
protected |
_browser
internal method (singleton?) to make sure only one browser per test run is being used.
TODO: fix returns so it's either a resource or ??
Definition at line 98 of file fossologyTest.php.
fossologyTest::createTestFolder | ( | $name, | |
$parent = 'root' |
|||
) |
createTestingFolder
Create a folder for use in testing
string | $name | the name of the folder to create |
string | $parent | the name of the parent folder. This is an optoinal parameter, if none supplied, then the root folder is used. |
Definition at line 126 of file fossologyTest.php.
fossologyTest::getFolderId | ( | $folderName, | |
$page, | |||
$selectName | |||
) |
getFolderId
parse the folder id out of the select statement
string | $folderName | the name of the folder |
string | $page | the xhtml page to search |
string | $selectName | the name attribute of the select statement to parse |
Definition at line 150 of file fossologyTest.php.
|
protected |
getSelectAttr
get select attributes.
string | $page | the page to parse |
string | $selectName | the name of the select, |
Definition at line 594 of file fossologyTest.php.
fossologyTest::getUploadId | ( | $uploadName, | |
$page, | |||
$selectName | |||
) |
getUploadId($uploadName, $page, $selectName)
parse the folder id out of the select in the $page
string | $uploadName | the name of the upload |
string | $page | the xhtml page to search |
string | $selectName | the name attribute of the select statement to parse |
Definition at line 188 of file fossologyTest.php.
fossologyTest::Login | ( | $User = NULL , |
|
$Password = NULL |
|||
) |
Login to the FOSSology Repository, uses the globals set in TestEnvironment.php as the default or the user and password supplied.
string | $User | the fossology user name |
string | $Password | the fossology user password |
Definition at line 214 of file fossologyTest.php.
fossologyTest::Logout | ( | $User = NULL | ) |
Logout of the FOSSology Repository, uses the globals set in TestEnvironment.php as the default or the user and password supplied.
string | $User | the fossology user name |
Definition at line 252 of file fossologyTest.php.
fossologyTest::parseFossjobs | ( | $all = NULL | ) |
function parseFossjobs
parse the output of fossjobs command, return an array with the information
With no parameters parseFossnobs will return an associative array with the last uploads done on each file. The array key is the filename, and upload Id is the value. The array is reverse sorted by upload (newest uploads 1st).
With the all parameter, all of the uploads are returned in an associative array. The keys are the upload id's in assending order, the filename uploaded is the value.
boolean | $all,indicates | all uploads are wanted. |
Definition at line 460 of file fossologyTest.php.
fossologyTest::parseSelectStmnt | ( | $page, | |
$selectName, | |||
$optionText = NULL |
|||
) |
parseSelectStmnt
Parse the specified select statement on the page
string | $page | the page to search |
string | $selectName | the name of the select |
string | $optionText | the text of the option statement |
Format of the array returned:
Array[option text]=>[option value attribute]
Definition at line 364 of file fossologyTest.php.
fossologyTest::setAgents | ( | $agents = NULL | ) |
function setAgents
Set 0 or more agents
Assumes it is on a page where agents can be selected with checkboxes. Will produce test errors if it is not.
string | $agents | a comma seperated list of number 1-4 or all. e.g. 1 1,2 1,4 4,3 all |
Definition at line 509 of file fossologyTest.php.
|
protected |
setSelectAttr
set select attributes.
string | $page | the page to parse |
string | $selectName | the name of the select |
string | $attribute | the name of the attribute to change, if the attribute is not already set, this method will not set it. |
string | $value | the value for the attribute |
Definition at line 643 of file fossologyTest.php.