|
| $uploadId = 25 |
|
| $olderAgentId = 3 |
|
| $otherAgentId = 4 |
|
| $agentId = 5 |
|
| $incompleteAgentId = 6 |
|
| $agentName = "agentName" |
|
| $otherAgentName = "otherAgentName" |
|
| $agentRev = "<agentRev>" |
|
| $olderAgentRev = "<olderAgentRev>" |
|
| $otherAgentRev = "<otherAgentRev>" |
|
| $incompleteAgentRev = "<incompleteAgentRev>" |
|
| $agentDesc = "<agentDesc>" |
|
| $otherAgentDesc = "<otherAgentDesc>" |
|
| $agentEnabled = true |
|
| $testDb |
|
| $dbManager |
|
| $logger |
|
| $agentsDao |
|
| $agent |
|
| $olderAgent |
|
| $otherAgent |
|
| $incompleteAgent |
|
Definition at line 16 of file AgentDaoTest.php.
◆ createAgent()
Fossology\Lib\Dao\AgentDaoTest::createAgent |
( |
|
$agentId = 2 | ) |
|
|
private |
Helper function to create an agent in the database for testing purposes.
- Parameters
-
int | $agentId | The ID to assign to the agent. Defaults to 2. |
- Returns
- int The ID of the created agent.
- Inserts a new record into the
agent
table with the specified ID and attributes.
- The inserted record includes fields such as
agent_name
, agent_rev
, agent_desc
, and agent_enabled
.
- Returns the ID of the created agent, which can be used for further testing or assertions.
Definition at line 193 of file AgentDaoTest.php.
◆ testGetAgentName()
Fossology\Lib\Dao\AgentDaoTest::testGetAgentName |
( |
| ) |
|
- Test:
- Test to retrieve the name of an agent by its ID AgentsDao::getAgentName()
- Create an agent to ensure there is an agent available for the test
- Check that the agent name is correctly retrieved and matches the expected value
Definition at line 221 of file AgentDaoTest.php.
◆ testGetAgentRev()
Fossology\Lib\Dao\AgentDaoTest::testGetAgentRev |
( |
| ) |
|
- Test:
- Test to retrieve the revision information of an agent by its ID AgentsDao::getAgentRev()
- Create an agent to ensure there is an agent available for the test
- Check that the agent revision is correctly retrieved and matches the expected value
Definition at line 207 of file AgentDaoTest.php.
◆ testGetCurrentAgentId()
Fossology\Lib\Dao\AgentDaoTest::testGetCurrentAgentId |
( |
| ) |
|
- Test:
- Test to retrieve the current agent ID for a specific agent type AgentsDao::getCurrentAgentId()
- Ensure an agent is created before fetching the agent ID
- Verify that the returned agent ID is not null and matches the expected ID
Definition at line 249 of file AgentDaoTest.php.
◆ testRenewCurrentAgent()
Fossology\Lib\Dao\AgentDaoTest::testRenewCurrentAgent |
( |
| ) |
|
- Test:
- Test to renew the current agent for a specific agent type AgentsDao::renewCurrentAgent()
- Ensure an agent is created before attempting to renew
- Verify that the renewal operation returns a non-null result and is successful
Definition at line 235 of file AgentDaoTest.php.
The documentation for this class was generated from the following file: